The default bug view has changed. See this FAQ.

about:config - must strip whitespace as a name for new alphanumeric

RESOLVED FIXED in Firefox 9

Status

()

Firefox
Preferences
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sys.sgx, Assigned: felix)

Tracking

Trunk
Firefox 9
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 549958 [details]
ff5.png

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
Build ID: 20110707182747

Steps to reproduce:

1. Browse to about:config
2. Right-click, and select New -> alphanumeric
3. When asked for a name, just press the spacebar once (for one space char)
4. Name accepted, you can also press spacebar for the value
5. New firefox value has been added, but with no name for it.

What's the point of having something like the one shown in the attached file?
Build identifier: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:9.0a1) Gecko/20110912 Firefox/9.0a1

I was able to reproduce the issue on latest Nightly build: new preference can be added with space as the name.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Updated

6 years ago
Severity: normal → major
(Reporter)

Comment 2

6 years ago
thanks for the update.
I will reinclude my question:
What's the point of having something like the one shown in the attached file?
(Assignee)

Updated

6 years ago
Assignee: nobody → ffung
OS: Windows Vista → All
Hardware: x86 → All
(Assignee)

Comment 3

6 years ago
Created attachment 560480 [details] [diff] [review]
Trimming config names

Summary of Changes
- Trim whitespace from any config name before creating it and if after trimming the preference name is empty, we cancel config creation.
Attachment #560480 - Flags: review?(margaret.leibovic)
(Reporter)

Comment 4

6 years ago
Thanks Felix :-)
I think is ok now.

Comment 5

6 years ago
Comment on attachment 560480 [details] [diff] [review]
Trimming config names

This looks okay to me, but I don't actually have the authority to review this, so I'm passing it off to Gavin.
Attachment #560480 - Flags: review?(margaret.leibovic)
Attachment #560480 - Flags: review?(gavin.sharp)
Attachment #560480 - Flags: feedback+
Attachment #560480 - Flags: review?(gavin.sharp) → review+

Comment 6

6 years ago
Felix, as an FYI, once a patch is review+, you can set the checkin-needed flag on the bug, and someone will usually come around and land it for you :)
Keywords: checkin-needed
This is now in my queue of things that are being sent to try then onto inbound.

I've fixed it locally and imported the patch fine for now; but so you know for future patches, this one had |exporting patch: <fdopen>| spuriously appended. Your best bet is to use mercurial queues (use as new a version of hg as possible) and follow the suggestions here: http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed

Thanks :-)
Severity: major → normal
Status: NEW → ASSIGNED
Keywords: checkin-needed
Version: 5 Branch → Trunk
(Reporter)

Comment 8

6 years ago
=== Update - New issue ===

New keys/values should should also strip *all* invalid characters.
I didnt start a new bug, as this can be fixed under the same topic.

How to reproduce:
1. Right click-> New alphanumeric
2. Enter any key that is a product of Alt+(num), ie ☼, ►, •, etc.

We should change at least the key creation to include only valid key characters.

Thanks
Blocks: 687820
The patch for the whitespace issue already has review/is about to land, so I've broken that out into a separate bug (bug 687820), to keep things clearer.
No longer blocks: 687820
Blocks: 687820
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=f07268905b26

https://hg.mozilla.org/integration/mozilla-inbound/rev/028baeb2ca21
Target Milestone: --- → Firefox 9
https://hg.mozilla.org/mozilla-central/rev/028baeb2ca21
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.