We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2af09b6 commit 6fe87b5Copy full SHA for 6fe87b5
src/librustdoc/html/static/js/storage.js
@@ -24,6 +24,10 @@ function getSettingValue(settingName) {
24
return def;
25
}
26
27
+ // Strip out characters we don't expect to find in settings values.
28
+ // This prevents an injection vulnerability where someone could plant
29
+ // JS code into the localStorage value, which could be executed when
30
+ // we pull it out.
31
return current.replace(/[^A-Za-z0-9_-]/g,"");
32
33
0 commit comments