Skip to content

Prevent "SubmitURL" from being Javascript#116

Merged
smorks merged 1 commit intosmorks:mainfrom
damienfinck:PreventSubmitUrlFromBeingJavascript
Jan 9, 2024
Merged

Prevent "SubmitURL" from being Javascript#116
smorks merged 1 commit intosmorks:mainfrom
damienfinck:PreventSubmitUrlFromBeingJavascript

Conversation

@damienfinck
Copy link
Copy Markdown
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
Copy Markdown
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