-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential code injection via
locale
parameter
Depending on the server configuration, it seems to be possible to inject actual JavaScript code: http://localhost/translations?locales=foo%0Auncommented%20code; => (function (Translator) { Translator.fallback = 'en'; Translator.defaultDomain = 'messages'; // foo uncommented code; })(Translator); This issue has been reported by Andreas Forsblom. This fix filters given locales and remove all locales that are not known by the Locale (intl extension) class. Signed-off-by: William DURAND <william.durand1@gmail.com>
- Loading branch information
1 parent
df6c0fd
commit 7accee9
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters