Bug 1015314 - Reduce self-xss prevention threshhold to 5. r=jwalker

This commit is contained in:
Manish Goregaokar 2014-07-31 22:05:00 -04:00
parent db748e586e
commit b8ccd3b59c
3 changed files with 4 additions and 4 deletions

View File

@ -1455,7 +1455,7 @@ pref("devtools.browserconsole.filter.secwarn", true);
pref("devtools.webconsole.fontSize", 0);
// Number of usages of the web console or scratchpad.
// If this is less than 10, then pasting code into the web console or scratchpad is disabled
// If this is less than 5, then pasting code into the web console or scratchpad is disabled
pref("devtools.selfxss.count", 0);
// Persistent logging: |true| if you want the Web Console to keep all of the

View File

@ -52,11 +52,11 @@ function consoleOpened(HUD) {
WebConsoleUtils.usageCount = 0;
is(WebConsoleUtils.usageCount, 0, "Test for usage count getter")
// Input some commands to check if usage counting is working
for(let i = 0; i <= 5; i++){
for(let i = 0; i <= 3; i++){
jsterm.setInputValue(i);
jsterm.execute();
}
is(WebConsoleUtils.usageCount, 6, "Usage count incremented")
is(WebConsoleUtils.usageCount, 4, "Usage count incremented")
WebConsoleUtils.usageCount = 0;
updateEditUIVisibility();

View File

@ -32,7 +32,7 @@ const REGEX_MATCH_FUNCTION_NAME = /^\(?function\s+([^(\s]+)\s*\(/;
const REGEX_MATCH_FUNCTION_ARGS = /^\(?function\s*[^\s(]*\s*\((.+?)\)/;
// Number of terminal entries for the self-xss prevention to go away
const CONSOLE_ENTRY_THRESHOLD = 10
const CONSOLE_ENTRY_THRESHOLD = 5
let WebConsoleUtils = {
/**
* Convenience function to unwrap a wrapped object.