Closed
Bug 88552
Opened 25 years ago
Closed 25 years ago
possible to enter chars and negative numbers in master password timeout
Categories
(Core Graveyard :: Security: UI, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
psm2.1
People
(Reporter: bugzilla, Assigned: inactive-mailbox)
Details
(Keywords: verifyme)
Attachments
(3 files)
|
765 bytes,
patch
|
Details | Diff | Splinter Review | |
|
2.62 KB,
patch
|
Details | Diff | Splinter Review | |
|
699 bytes,
patch
|
Details | Diff | Splinter Review |
In the Master Password Timout value in the prefs -> Privacy -> Master Password
it's possible to enter both "-100" and "a"
There should be a simple a javscritpt check that check that the text is a
number and is >= 0
build 20010629 on win2k
Comment 1•25 years ago
|
||
-> kai
Assignee: ssaux → kai.engert
Priority: -- → P2
Target Milestone: --- → 2.1
| Assignee | ||
Comment 2•25 years ago
|
||
| Assignee | ||
Comment 3•25 years ago
|
||
| Assignee | ||
Comment 4•25 years ago
|
||
I created two attachments.
The first one is a simple fix, which makes sure invalid values will not be
stored, but a zero will be stored instead. However, the user still can enter
wrong characters.
Originially I wanted to have additional magic within the dialog, that
automatically and immediately removes invalid characters, but keeps the good
input obtained so far.
However, I couldn't get it to work. It works the first time a wrong character is
entered, but it doesn't work for additional chars. It seems, using the
setAttribute("value", ...) method is not reliable if used multiple times. There
might be some additional magic needed which I'm not aware of.
I'm attaching a patch that contains my test code, including some debugging output.
Unless someone with more JavaScript knowledge jumps in, I suggest to check in
the simple fix patch (id 41052).
| Assignee | ||
Comment 5•25 years ago
|
||
David, please review the simple fix.
Or do you have ideas regarding my second patch?
Comment 6•25 years ago
|
||
r=ddrinan on the first patch.
I do not understand the prevent_recursion variable in the second patch. Please
explain what you're trying to do here.
| Assignee | ||
Comment 7•25 years ago
|
||
The prevent_recursion was kind of safety measurement, not sure if it's really
required.
If the user modifies passwordTimeout, the function changePasswordSettings is
called. From within this function, I immediately change the contents if wrong
input is produced by the user.
I feared that this could cause a loop, as function changePasswordSettings might
be immediately called again. I try to prevent the loop by setting the
prevent_recursion flag during modification.
However, when I now think about it, I guess there is an event queue and only one
event is handled at a time, so the next call to changePasswordSettings might be
delayed until we return from it. But during testing this didn't seem to have any
influence on my reported problems.
Comment 8•25 years ago
|
||
sr=blizzard
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Comment 9•25 years ago
|
||
Kai: could you also fix http://bugzilla.mozilla.org/show_bug.cgi?id=25473 which
has the same problem?
Comment 10•25 years ago
|
||
adding nsenterprise to all P1, P2 PSM bugs with target milestone of 2.1
Keywords: nsenterprise
| Reporter | ||
Comment 12•25 years ago
|
||
This bug could also be fixed using the new spinbutton widget!
See http://bugzilla.mozilla.org/show_bug.cgi?id=90314
| Assignee | ||
Comment 14•25 years ago
|
||
Henrik, Spinbuttons might be used to assist an implementation. However, even if
using Spinbuttons, the user is still able to edit the text field manually, so a
fix to this bug is still required.
If you want to fix this with spinbuttons only, it would be necessary to set the
edit field to read-only for the user, and allow modifications only by clicking
the buttons.
Don't know if that is what is wanted.
Comment 16•25 years ago
|
||
Checked in first patch for Kai.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 18•25 years ago
|
||
Reopening. This line: "timeout = "0";" causes the master password to be asked
for repeatedly - three times in a row.
How about setting this value to 1?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 19•25 years ago
|
||
In my humble opinion, this could be a separate bug. The reporter asked to
correct input that is invalid, and that's what we are doing.
Zero is a correct input, and is the safest setting we could chose. If the user
didn't make a correct input, we shouldn't go to an unsafe setting. And maybe he
wanted zero, to force reasking, but mistyped. We shouldn't go the 1 in that
case.
But I agree there is still a need for something that protects the user from bad
input and gives immediate feedback. To my knowledge, we just don't have a proper
widget to do this yet.
My opinion is: If we want to keep this bug open, we should make it dependent on
some other bug that describes the need for implementing such a widget.
| Assignee | ||
Comment 20•25 years ago
|
||
junruh argued that if the user wanted to be reasked constantly, he would have
selected the "ask every time" option. That convinces me that the minimal setting
for the "ask again" interval should indeed be one minute, not zero.
I'll add a patch that changes the default to "1".
Status: REOPENED → ASSIGNED
| Assignee | ||
Comment 21•25 years ago
|
||
| Assignee | ||
Comment 22•25 years ago
|
||
David, can you please review?
Comment 23•25 years ago
|
||
r=ddrinan.
Comment 24•25 years ago
|
||
Checked in patch for Kai.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 25•25 years ago
|
||
Okay, so if a bogus value ("MSIE" or -27) is entered into the field, then when
the pref window is closed via the [OK] button, the value is defaulted to 1.
And maybe I'm picking nits here, but shouldn't the text displayed in the field
also default to 1 when the focus is lost from the input field? The summary of
this bug hasn't been fixed, but the problem that stems from it has. Again, I'm
probably just picking nits...
Kai? Comments?
| Assignee | ||
Comment 26•25 years ago
|
||
ckritzer: I absolutely agree with you. I just don't know yet how this could be
done. In the debug patch that I attached I tried to do it, without success.
Comment 27•25 years ago
|
||
WFM. Verified fixed.
Status: RESOLVED → VERIFIED
QA Contact: ckritzer → junruh
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•