Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Season 2/Level 5 - Minor Omissions in the Hint and Solution #64

Closed
evarga opened this issue Jan 4, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@evarga
Copy link
Contributor

evarga commented Jan 4, 2024

Summary

There are two minor problems as explained in the next section.

How to reproduce

In the hint-1.txtthere are two examples given as follows:

Example 1:
$ var s = { toString: function() { alert('Exploit 1'); } };
$ CryptoAPI.sha1.hash(s)

Example 2:
$ var s = { toString: function() { alert('Exploit 1'); } };
$ CryptoAPI.sha1.hash("abc")

Nonetheless, the second example doesn't demonstrate anything and should be removed.

In solution.js the line 62 should be changed from:

if ((i & 63) == 63) CryptoAPI.sha1._round(H, w);

to:

if ((i & 63) == 63) internalRound(H, w);

This is explained in the text of the solution, but the code base is not synced with that description.

@evarga evarga added the bug Something isn't working label Jan 4, 2024
@evarga evarga mentioned this issue Jan 4, 2024
2 tasks
jkcso pushed a commit that referenced this issue Jan 4, 2024
@jkcso
Copy link
Collaborator

jkcso commented Jan 4, 2024

Fixed, thank you!

@jkcso jkcso closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants