Misbehavior of Margin input fields (also replicable for History field)

RESOLVED DUPLICATE of bug 238725

Status

()

Firefox
General
--
minor
RESOLVED DUPLICATE of bug 238725
14 years ago
14 years ago

People

(Reporter: Saurabh Gupta, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

When a larger number (7 digits and above) is entered in the Margin fields i.e.
Top, Left, Right or Bottom, instead of setting such values to default, the
browser sets some absurd values (not defaults).

Reproducible: Always
Steps to Reproduce:
1. Enter any of the following values (test cases I used) in the Page
Setup->Margins area. While doing so set the other three margins to 0 (for ease
of comprehension).
Input	        
------          
99999998	
99999997	
9876543	        
9785634	        
3333333	        
4444444	        
9999999	        
9999998	        
9999997	        
9999991	        
9999990	        

2. Accept (click Ok) and revisit the field to observe the changed values
3.

Actual Results:  
For the above mentioned values, these are the observations:

Input	        Changed to
------          ----------
99999998 ->	1408952.0
99999997 ->	1408953.0
9876543  ->	928694.4
9785634  ->	837785.4
3333333  ->	350716.8
4444444  ->	1461827.8
9999999  ->	1052150
9999998  ->	1052149
9999997  ->	1052148.4
9999991  ->	1052142.4
9999990  ->	1052141.4


Expected Results:  
The expectations were that, in case an arbitrary value is entered, the browser
would warn or prompt of an invalid or too large an input. Else, the browser
would reset such arbitrary values to some default value that the browser uses.


Follow up tests
---------------
1. As the first follow up test, I closed the program and restarted it, only to
find the same behavior and no default value set.

2. Replicating the same behavior with I.E., prompted of a margin overlapping
warning and did not allow me to enter an arbitrary value.

3. I replicated this with certain other fields, and found a similar behavior
with the History field (which again has no default)

Input         Changed to
------        ----------
9999999990 -> 1410065398
9999999999 -> 1410065407
9999999991 -> 1410065399
9999999995 -> 1410065403
4444444444 -> 149477148
3333333333 -> -961633963
2222222222 -> -2072745074
-9999999999 ->-1410065407
9999999999 -> 1410065407

3. Changing the other margin values from zero (0) to 1 changes the vaules that
are set.

Importance of the bug
---------------------
1. Whenever variables are used in software, they must be assigned a legitimate
value. If they are used before a legitimate value has been assigned, the
software will fail [Whittaker-How to break Software]. This bug gives a room for
this kind of attack that Whittaker speaks about.

2. Other contemporary browsers reset to default values once the
application/browser is closed and even in cases when invalid input is entered.
However Firefox does not perform either of these options and upon reusing the
browser the user has to reset (set some value) the values for desired output.

This issue subtly conflicts with the statements made under "More Responsive" and
"Better Bookmarks and History" at http://www.mozilla.org/products/firefox/why/

Comment 1

14 years ago
*** Bug 238585 has been marked as a duplicate of this bug. ***

Comment 2

14 years ago
See also bug 238725, margins larger than the page size should be rejected.
duping to the bug that, when fixed, will fix this as well.

*** This bug has been marked as a duplicate of 238725 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.