~mvo/apt/prevent-replay-attacks

« back to all changes in this revision

Viewing changes to apt-pkg/acquire-item.cc

  • Committer: Michael Vogt
  • Date: 2008-11-24 17:06:59 UTC
  • Revision ID: michael.vogt@ubuntu.com-20081124170659-9np3k66ll0m4ach8
add test-data, fix compilation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1147
1147
   }
1148
1148
 
1149
1149
   if (_config->FindB("Acquire::Check-Valid-Until", true)) {
1150
 
      if (time(NULL) > MetaIndexParser->GetValidUntil()) {
 
1150
      if (MetaIndexParser->GetValidUntil() > 0 &&
 
1151
          time(NULL) > MetaIndexParser->GetValidUntil()) {
1151
1152
         return _error->Error(_("Release file expired, ignoring %s"),
1152
1153
                              RealURI.c_str());
1153
1154
      }