Improve anti-self-xss warning message

RESOLVED FIXED in Firefox 34

Status

()

Firefox
Developer Tools: Scratchpad
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jwalker, Assigned: manishearth, Mentored)

Tracking

(Blocks: 1 bug)

Trunk
Firefox 34
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

See bug 994134 comment 78 and 79.
I'll do this today or tomorrow.
Assignee: nobody → manishearth
Status: NEW → ASSIGNED

Updated

3 years ago
Blocks: 971597
Summary: Improve anti-self-xs warning message → Improve anti-self-xss warning message
Blocks: 994134, 1046672
Created attachment 8469865 [details] [diff] [review]
Add separate message for scratchpad

I didn't add the bolding (It would require either putting HTML in the l10n file, or having a couple more strings), but if you want I can add it.
Attachment #8469865 - Flags: review?(jwalker)
Comment on attachment 8469865 [details] [diff] [review]
Add separate message for scratchpad

Review of attachment 8469865 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/devtools/webconsole/utils.js
@@ +561,5 @@
>     * @param nsIDOMElement notificationBox
>     * @returns A function to be added as a handler to 'paste' and 'drop' events on the input field
>     */
> +  pasteHandlerGen: function WCU_pasteHandlerGen(inputField, notificationBox, l10nURL) {
> +    let l10nBundle = new WebConsoleUtils.l10n(l10nURL);

Rather than construct a new WebConsoleUtils.l10n object here, please could you pass in 'msg'.

webconsole.js already has a module variable for the Strings object, but we'll need to add one to scratchpad, I think.

It's a bit more code duplication, but the l10n objects can be fairly heavyweight, so I think it's justified.
Attachment #8469865 - Flags: review?(jwalker) → review+
Created attachment 8472972 [details] [diff] [review]
Patch, strings passed to handler generator

Try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=b44ed005d30b
Attachment #8469865 - Attachment is obsolete: true
Attachment #8472972 - Flags: review?(jwalker)
Comment on attachment 8472972 [details] [diff] [review]
Patch, strings passed to handler generator

Review of attachment 8472972 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, Manish
Attachment #8472972 - Flags: review?(jwalker) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/17485987eef9
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/17485987eef9
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 34
QA Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.