EMail Address collection accepts values below 0

VERIFIED INVALID

Status

SeaMonkey
MailNews: Address Book & Contacts
VERIFIED INVALID
17 years ago
13 years ago

People

(Reporter: Junk_HbJ, Unassigned)

Tracking

({polish})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Fix
1.91 KB, patch
Fabian Guisset
: review+
Details | Diff | Splinter Review
(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.8.1+) Gecko/20010429
BuildID:    2001042908

The Mozilla preferences accept negative values as a limit for the "Collected
adress book"

Reproducible: Always
Steps to Reproduce:
1. Open Preferences
2. "Mail and Newsgroups" - "Address Books"
3. Set x < 0 in "Limit the collected adress book to x entries".

Actual Results:  Negative value accepted and saved

Expected Results:  Negative value rejected
->mailnews
Assignee: mcafee → chuang
Component: Preferences → Address Book
Product: Browser → MailNews
QA Contact: sairuh → esther

Updated

17 years ago
QA Contact: esther → fenella

Comment 2

17 years ago
Marking NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: polish

Updated

17 years ago
QA Contact: fenella → nbaca

Comment 4

17 years ago
Patch sets the field value to '0' if:
* value is less than zero
* value is not numeric
* value contains no string

Patch also floor()s positive numbers for extra bullet-proofing. r/sr please.
Keywords: patch, review
OS: Windows NT → All
Hardware: PC → All

Comment 5

17 years ago
Comment on attachment 55402 [details] [diff] [review]
Fix

r=fabian.
Is onblur fired when clicking "OK" directly after inputting something?
Attachment #55402 - Flags: review+

Comment 6

17 years ago
Yes, it loses focus as soon as something else gets focus.
suggestion:  we have this problem in a bunch of UI elements.

could we extend textbox, using XBL, to accomplish this in a generic way?

Comment 8

17 years ago
Hyatt sez: 'Let's wait for XPath/Forms/whatever' (paraphrased heavily).

That isn't going to happen for a while, shall we go with this patch?
I talked to hyatt, xforms is what we need.

see bug #97806

and http://www.w3.org/MarkUp/Forms/

I don't want to proceed with this patch, or with any of the other patches we've 
got validating text areas.  (mailnews has a bunch of these bugs.)

your effort is better spent on starting on the xbl bindings for xforms.
Assignee: chuang → sspitzer
Depends on: 97806
> your effort is better spent on starting on the xbl bindings for xforms.

I didn't realize that xforms is slated for mozilla 1.2

here's what I'd suggest:  read the xforms documentation, and start coming up 
with some xbl.  for now, the xbl can live in 
mozilla/mailnews/base/resources/content/mailWidgets.xml

I'd suggest a simple binding that does what you need, that would be a valid 
subset of xforms.  if it goes well, we can get hyatt's approval and move it to 
where xforms should really live.
Product: Browser → Seamonkey

Updated

13 years ago
Assignee: sspitzer → mail
This pref was removed by Bug 167571, therefore marking as invalid as it's no
longer a bug.
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
Yup, verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.