-
Notifications
You must be signed in to change notification settings - Fork 1
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
issue:#14 replaceAll addition #15
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thank you for your PR. Your help and contribution is appreciated!
code: '$("div").append($("input").replaceAll("<script>"))', | ||
errors: [{message: error, type: 'CallExpression'}] | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaceAll
method is different than than the rest of unsafe methods. Calee and parameter are reversed, see https://api.jquery.com/replaceAll/.
$( "<script>" ).replaceAll( "div" );
In order to better understand this, try to create XSS-vulnerable code with replaceAll
.
- Please fix these tests based on https://api.jquery.com/replaceAll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh alright, will check more on this and update accordingly.
Please be aware that changes are commited by @aishwarya-nagtilak08 account while the fork is owned by @sameer-555. Is this intentional? |
Closes #14 after merge. |
This might be related to mvondracek/jQuery-XSS#7 in case you would like to look into that as well. |
That wasn't intentional but expected since I was using my girlfriend's laptop. |
mvondracek/jQuery-XSS#7 I'll look into it. |
Hi team,
this is fix for issue #14, this is one of my first opensource contributions. please let know in case there are any corrections.