File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ protected function checkRollbackAttack(MetadataBase $untrustedMetadata): void
3333 $ expectedUntrustedVersion = $ this ->trustedMetadata ->version + 1 ;
3434 $ untrustedVersion = $ untrustedMetadata ->version ;
3535 if ($ expectedUntrustedVersion && ($ untrustedMetadata ->version !== $ expectedUntrustedVersion )) {
36- throw new RollbackAttackException ("Remote 'root' metadata version \"$ $ untrustedVersion \" " .
37- "does not the expected version \"$ $ expectedUntrustedVersion \"" );
36+ throw new RollbackAttackException ("Remote 'root' metadata version \"{ $ untrustedVersion} \" " .
37+ "does not match the expected version \"{ $ expectedUntrustedVersion} \"" );
3838 }
3939 parent ::checkRollbackAttack ($ untrustedMetadata );
4040 }
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ public function verify(MetadataBase $untrustedMetadata): void
120120 public function testCheckRollbackAttackAttackExpectedVersion (): void
121121 {
122122 $ this ->expectException ('\Tuf\Exception\Attack\RollbackAttackException ' );
123- $ this ->expectExceptionMessage ('Remote \'root \' metadata version "$ 2" does not the expected version "$ 3" ' );
123+ $ this ->expectExceptionMessage ('Remote \'root \' metadata version "2" does not match the expected version "3" ' );
124124
125125 // The incoming version is lower than the local version, so this should
126126 // be identified as a rollback attack.
You can’t perform that action at this time.
0 commit comments