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

Prevent "SubmitURL" from being Javascript #116

Merged

Conversation

damienfinck
Copy link
Contributor

The variable "SubmitURL" comes from the "action" attribute of the HTML "form" tag. This attribute can contain Javascript, for example <form action="javascript: submit()"> or other protocol like <form action="mailto:john@example.org">.
We need to make a few basic checks to exclude these cases. I suggest checking the Scheme and Authority.

Other reason: The option "Return only best matching entries for an URL instead of all entries for the whole domain" doesn't work as expected when SubmitURL is Javascript. It's not logical to use Levenshtein's algorithm to compare a URL and Javascript.

@smorks
Copy link
Owner

smorks commented Jan 2, 2024

thank you for these. will review and get them merged ASAP.

@smorks smorks merged commit 31b3351 into smorks:main Jan 9, 2024
@damienfinck damienfinck deleted the PreventSubmitUrlFromBeingJavascript branch February 18, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants