Closed Bug 675794 Opened 12 years ago Closed 12 years ago

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


(Firefox :: Settings UI, defect)

Not set



Firefox 9


(Reporter: sys.sgx, Assigned: felix)




(2 files)

Attached image 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.
Ever confirmed: true
Severity: normal → major
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: nobody → ffung
OS: Windows Vista → All
Hardware: x86 → All
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)
Thanks Felix :-)
I think is ok now.
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?(
Attachment #560480 - Flags: feedback+
Attachment #560480 - Flags: review?( → review+
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:

Thanks :-)
Severity: major → normal
Keywords: checkin-needed
Version: 5 Branch → Trunk
=== 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.

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
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.