Closed
Bug 96604
Opened 25 years ago
Closed 25 years ago
Deleting characters from some form input controls will allow altering page content - Trunk [@ 0x00000000 - nsTypedSelection::EndBatchChanges]
Categories
(Core :: Layout: Form Controls, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: caillon, Assigned: kinmoz)
References
Details
(4 keywords, Whiteboard: want for 0.9.4)
Crash Data
Attachments
(5 files)
|
13.91 KB,
image/png
|
Details | |
|
42.45 KB,
image/png
|
Details | |
|
67 bytes,
text/html
|
Details | |
|
2.45 KB,
patch
|
Details | Diff | Splinter Review | |
|
2.42 KB,
patch
|
Details | Diff | Splinter Review |
Linux 2001082221.
1. In Bugzilla, click on "create a new attachment"
2. Type something in the description input box. Anything is fine.
3. Move the cursor to the beginning of the input box and start hitting backspace
a couple times.
4. The input control moves! (screenshot to follow)
I'm not sure why it does it only on that control. I've tried it on the form
controls on this page and nothing has happened.
| Reporter | ||
Comment 1•25 years ago
|
||
| Reporter | ||
Comment 2•25 years ago
|
||
Hmm, I can get it to happen on the depends on blocks input controls on this bug
report page also.... Also, when you do get it to change, pressing CTRL + Z
(undo) while inside the input control will undo the move.
Comment 3•25 years ago
|
||
confirmed, Linux 2001082221
Comment 4•25 years ago
|
||
Confirming this with current (10 minutes old) trunk on Red Hat 7.1 Linux.
| Reporter | ||
Comment 6•25 years ago
|
||
Comment 8•25 years ago
|
||
Ender lite strikes again.
Comment 9•25 years ago
|
||
trying to reproduce this bug on win2000 -build ID: 2001-08-24-06 trunk, caused a
browser crash.
I'll provide the incident ID as soon as i am able to connect to Talkback.
Currently I am having some problem doing so.
I am going to open a new bug for this issue since it is different from the
original bug.
Comment 10•25 years ago
|
||
Here is the stack trace:
========================================================
Incident ID: 34476125
Stack Signature: 0x00000000 d8df30cd
Bug ID
Trigger Time: 2001-08-24 11:26:11
Email Address: madhur@netscape.com
User Comments:
Build ID: 2001082406
Product ID: MozillaTrunk
Platform ID: Win32
Trigger Reason: Access violation
Stack Trace
===========================================================
0x00000000
nsTypedSelection::EndBatchChanges
[d:\builds\seamonkey\mozilla\content\base\src\nsSelection.cpp, line 7500]
nsEditor::Do [d:\builds\seamonkey\mozilla\editor\base\nsEditor.cpp, line 503]
nsEditor::DeleteSelectionImpl
[d:\builds\seamonkey\mozilla\editor\base\nsEditor.cpp, line 4413]
nsPlaintextEditor::DeleteSelection
[d:\builds\seamonkey\mozilla\editor\base\nsPlaintextEditor.cpp, line 935]
nsTextEditorKeyListener::KeyPress
[d:\builds\seamonkey\mozilla\editor\base\nsEditorEventListeners.cpp, line 244]
nsEventListenerManager::HandleEvent
[d:\builds\seamonkey\mozilla\content\events\src\nsEventListenerManager.cpp, line
1633]
nsGenericElement::HandleDOMEvent
[d:\builds\seamonkey\mozilla\content\base\src\nsGenericElement.cpp, line 1687]
nsHTMLInputElement::HandleDOMEvent
[d:\builds\seamonkey\mozilla\content\html\content\src\nsHTMLInputElement.cpp,
line 1099]
PresShell::HandleEventInternal
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 5653]
PresShell::HandleEvent
[d:\builds\seamonkey\mozilla\layout\html\base\src\nsPresShell.cpp, line 5578]
nsView::HandleEvent [d:\builds\seamonkey\mozilla\view\src\nsView.cpp, line 377]
nsView::HandleEvent [d:\builds\seamonkey\mozilla\view\src\nsView.cpp, line 350]
nsView::HandleEvent [d:\builds\seamonkey\mozilla\view\src\nsView.cpp, line 350]
nsViewManager::DispatchEvent
[d:\builds\seamonkey\mozilla\view\src\nsViewManager.cpp, line 2056]
HandleEvent [d:\builds\seamonkey\mozilla\view\src\nsView.cpp, line 68]
nsWindow::DispatchEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 732]
nsWindow::DispatchWindowEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 749]
nsWindow::DispatchKeyEvent
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 2405]
nsWindow::OnKeyDown
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 2473]
nsWindow::ProcessMessage
[d:\builds\seamonkey\mozilla\widget\src\windows\nsWindow.cpp, line 3170]
Comment 11•25 years ago
|
||
I was able to reproduce the original bug "Deleting characters from beginning of
some form input controls will delete page content" on win2000 also.
To reproduce the crash:
1. enter something in the text box.
2. go to the beginning of the text
3. press "backspace' key ---- the page content will start deleting as mentioned
in the previous comments by the reporter.
4. now, press the 'del' key
---- the browser will crash
Comment 12•25 years ago
|
||
Bug 96841 has already been written for the crash problem.
| Assignee | ||
Comment 14•25 years ago
|
||
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.9.5
| Reporter | ||
Comment 16•25 years ago
|
||
Adding some keywords. I think this will be a fairly big catfood issue. Input
forms are all over the web and a lot of people just press and hold backspace to
erase what they've typed. This bug will certainly alarm quite a few users. If
there is a fix, kin, it might be worth trying to get this into 0.9.4. Otherwise
I think this will become a mostfreq bug during the upcoming weeks.
Also, I wonder if the blocker/crasher bug 96841 is caused in part by this?
Whiteboard: want for 0.9.4
Comment 17•25 years ago
|
||
*** Bug 97024 has been marked as a duplicate of this bug. ***
Comment 18•25 years ago
|
||
There's more to it but see for yourself... :
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=47144 (from Bug 97024)
A) you can also delete characters from the end of some input controls
B) you can add text to the html-page
Detailed how-to in Bug 97024, too - changing Summary.
Summary: Deleting characters from beginning of some form input controls will delete page content → Deleting characters from some form input controls will allow altering page content
Comment 19•25 years ago
|
||
Interesting : One of the affected input controls is ... the URL-Bar =)
| Assignee | ||
Comment 20•25 years ago
|
||
| Assignee | ||
Comment 21•25 years ago
|
||
Moving to mozilla.0.9.4.
I just attatched a patch that fixes the problem.
jfrancis, can I get an r= from you?
Target Milestone: mozilla0.9.5 → mozilla0.9.4
Comment 22•25 years ago
|
||
r=jfrancis, with one caveat. We have a bunch of places in editor/base where we
get the root element and qi it to a root node, and then compare it to another
node. Should we change all those to call IsRootElement? Seems cleaner...
| Assignee | ||
Comment 23•25 years ago
|
||
Yeah, I'd like to see us use this method when we can. I don't see any reason
not to unless we're going to be continuously comapring in a time critical
piece of code.
In any case that can be done in a separate sweep, since we want to keep changes
minimal especially if we want this to go into 0.9.4.
sfraser, can I get an sr= from you?
Comment 24•25 years ago
|
||
This looks hokey:
+PRBool
+nsEditor::IsRootNode(nsIDOMNode *inNode)
+{
+ if (!inNode)
+ return PR_FALSE;
+
+ nsCOMPtr<nsIDOMElement> rootElement;
+
+ nsresult result = GetRootElement(getter_AddRefs(rootElement));
+
+ if (NS_FAILED(result) || !rootElement)
+ return PR_FALSE;
+
+ nsCOMPtr<nsIDOMNode> rootNode = do_QueryInterface(mBodyElement);
+
+ if (inNode == rootNode.get())
+ return PR_TRUE;
+
+ return PR_FALSE;
}
Why get rootElement and ignore it?
| Assignee | ||
Comment 25•25 years ago
|
||
Yeah, my bad, changed:
+ nsCOMPtr<nsIDOMNode> rootNode = do_QueryInterface(mBodyElement);
to:
+ nsCOMPtr<nsIDOMNode> rootNode = do_QueryInterface(rootElement);
| Assignee | ||
Comment 26•25 years ago
|
||
| Assignee | ||
Comment 27•25 years ago
|
||
I just attatched the latest diff I have in my tree. Can I get an sr=?
Comment 28•25 years ago
|
||
sr=sfraser
Comment 29•25 years ago
|
||
is bug 97196 a dup?
| Assignee | ||
Comment 30•25 years ago
|
||
*** Bug 97196 has been marked as a duplicate of this bug. ***
Comment 31•25 years ago
|
||
high profile. high reward. a=asa
| Assignee | ||
Comment 32•25 years ago
|
||
Checked fix into the TRUNK:
mozilla/editor/base/nsEditor.cpp revision 1.334
mozilla/editor/base/nsEditor.h revision 1.132
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 33•25 years ago
|
||
Good, haven't had a chance to test this, but I crashed after using 'Delete' in
the Additional Comments field and finding the rest of the page being pulled up
by one line each time, then hitting 'Submit'. Commenting here in case it has any
bearing on anything.
Keywords: regression
Comment 34•25 years ago
|
||
James Green: the crash you saw is probably bug 96841
Comment 35•25 years ago
|
||
Nope this was after form submission. Editing had been completed. I hit Submit,
saw the network get busy, then returned from another screen a minute later and
mozilla had segfaulted.
| Assignee | ||
Comment 36•25 years ago
|
||
*** Bug 97336 has been marked as a duplicate of this bug. ***
Comment 37•25 years ago
|
||
*** Bug 96718 has been marked as a duplicate of this bug. ***
Comment 38•25 years ago
|
||
*** Bug 97501 has been marked as a duplicate of this bug. ***
Comment 39•25 years ago
|
||
*** Bug 97236 has been marked as a duplicate of this bug. ***
Comment 40•25 years ago
|
||
verified fixed on win2000 - buildID: 2001-08-29-11trunk and linux 7.1 - buildID:
2001-08-28-08trunk.
No crash, too.
Status: RESOLVED → VERIFIED
Comment 41•25 years ago
|
||
*** Bug 97718 has been marked as a duplicate of this bug. ***
Comment 42•25 years ago
|
||
*** Bug 98018 has been marked as a duplicate of this bug. ***
Comment 43•25 years ago
|
||
*** Bug 98172 has been marked as a duplicate of this bug. ***
Comment 44•25 years ago
|
||
Adding crash, topcrash keywords and Trunk [@ 0x00000000 -
nsTypedSelection::EndBatchChanges] to summary for future reference.
Updated•15 years ago
|
Crash Signature: [@ 0x00000000 - nsTypedSelection::EndBatchChanges]
You need to log in
before you can comment on or make changes to this bug.
Description
•