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

Encoding error when approving link during manual operation #2968

Closed
guillaume-duong-bib opened this issue Apr 30, 2024 · 1 comment · Fixed by mitre/magma#49
Closed

Encoding error when approving link during manual operation #2968

guillaume-duong-bib opened this issue Apr 30, 2024 · 1 comment · Fixed by mitre/magma#49
Assignees
Labels

Comments

@guillaume-duong-bib
Copy link

guillaume-duong-bib commented Apr 30, 2024

Describe the bug

NB: I stumbled upon this bug while investing #2887. I will most likely submit PRs for the both of them.

The function b64DecodeUnicode (plugins\magma\src\utils\utils.js) used in updateLink (plugins\magma\src\stores\operationStore.js) fails when some characters are present in the command. More characters may cause the error, but here's those I confirmed (will update this if necessary):

  • dot .
  • dollar $

Edit: since the root cause is atob() (I found out that Edge is a bit more talkative than Firefox while testing), I expect any string that is not a proper b64 string to fail.

Error triggered:
DOMException: String contains an invalid character (firefox)
DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. (edge)

To Reproduce
Steps to reproduce the behavior:

  1. In an operation started in manual mode, approve a link whose command contains a dot . (it needs to be present in the adversary, not edited in).

Expected behavior
The approval should not restrict supported characters differently than the characters usually supported in abilities.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox 125.0.3 (64-bit), Edge 124.0.2478.67 (Official build) (64-bit)
Copy link

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants