Closed Bug 169858 Opened 22 years ago Closed 22 years ago

Browser--Can not login CMB website.

Categories

(Core :: Internationalization, defect, P1)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla1.0.2

People

(Reporter: shanjian, Assigned: shanjian)

References

Details

(Keywords: intl, topembed+, Whiteboard: [adt1] [ETA 09/21] [Needs Approvals])

Attachments

(2 files, 1 obsolete file)

Copied from bugscape 20050 1) Open "https://www.bj.cmbchina.com/script/BaseHttp.dll?HbLoadLoginPage?pageno=1&date=0WedSep182002164841GMT+0800&area=0010". 2) Input valid account and password such as "37254496" and "197871" and extra authorization code provided by this page random. 3) Click "ok" button. Current result: the webpage is still the one before submitted. In IE6.0,it works. In NN7.0,it works too. Ji found out that it is related with universal autodetector.When it is turned off, problem will be gone.
Ok, here is what I found. The bug in fact reveals 2 problems. 1, This site use frames. The page of mainframe is received using "POST", but the child frame is received with "GET". That lead to autodetection being enabled. 2, Each page of this site include meta charset "gb2312". In our universal auto-detection, we decide to return "gb18030" for both "gb2312" and "gb18030" document. There is nothing wrong with that. But because the 2 charset is different, a reload is triggered. That explained why chinese detector does not have this problem. (because it report "gb2312"). The charset reload being triggered is not acceptable in this case, because meta charset should take priority of auto-detection. There is a bug in nsDetectionAdaptor.cpp. Patch will follow.
Status: NEW → ASSIGNED
Summary: Browser--Can not login CMB website. → Browser--Can not login CMB website.
Attached patch patch address frame post (1) (deleted) — Splinter Review
Attached patch patch address charset adaptor problem (2) (obsolete) (deleted) — Splinter Review
Patch 1 address the first problem. For posted frameset, if the parent get its charset from submitting doc, the children will inherited as from submitting doc. That will disable child frame charset autodetection, and it should have no other effect. (Meta charset is higher that submitting doc charset, meta charset will not be affected.) Patch 2 address the charset adaptor problem. Basically we have one path not covered. I just relocate some code and the patch is self explainatory. Any one of the 2 patch alone will solve this issue. But I suggest to get both of them in. Patch 1 is especially important. We probably need to file 2 new bugs in bugzilla and check them in. I am too sleepy now so I will leave it for tomorrow.
cc to r/sr
This is a blocker for a major embedding customer (topembed+).
Severity: normal → critical
Priority: -- → P1
Whiteboard: [adt1] [ETA 09/21] [Needs Reviews]
Target Milestone: --- → mozilla1.0.2
Keywords: approval
Blocks: 154896
Comment on attachment 99952 [details] [diff] [review] patch address frame post (1) r=jbetak
Attachment #99952 - Flags: review+
Comment on attachment 99953 [details] [diff] [review] patch address charset adaptor problem (2) r=jbetak
Attachment #99953 - Flags: review+
Comment on attachment 99952 [details] [diff] [review] patch address frame post (1) + else if (kCharsetFromHintPrevDoc == parentSource) + // if parent is posted doc, set this prevent autodections Add the missing 'to' in "set this to prevent autodetection", and loose the trailing s in autodetections. sr=jst
Attachment #99952 - Flags: superreview+
Comment on attachment 99953 [details] [diff] [review] patch address charset adaptor problem (2) - if(mWeakRefParser) { ... + mWeakRefParser->SetDocumentCharset(newcharset, kCharsetFromAutoDetection); I don't feel comfortable with removing this null check. Looks like you think you still need it up above in this method and I don't see how this case is any different. sr=jst if you put the null check back.
Attachment #99953 - Flags: superreview+
Comment on attachment 99952 [details] [diff] [review] patch address frame post (1) r=jkeiser too, after much wrangling. I think the heuristics overall leave something to be desired but this is a definite improvement over the previous heuristics.
Attached patch put null check to patch 2. (deleted) — Splinter Review
Agree, the null check should be there.
Comment on attachment 99957 [details] [diff] [review] put null check to patch 2. carry over r/sr
Attachment #99957 - Flags: superreview+
Attachment #99957 - Flags: review+
Attachment #99953 - Attachment is obsolete: true
patch checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
QA contact to myself.
QA Contact: ruixu → ji
I changed Autodetect to Universal, and logged in with np. :-) Looks fixed to ME, but we should have the QA verify this, as well as test this area of the code, by looking at the test cases for bug 162239. Can we run the Form Submission tests as well? Let's make sure we did not cause any regressions.
Keywords: intl
Tested 09/20 trunk build with the original testcase, testcases mentioned in bug 162239 and charset override testcases in babel, no regressions have been found. Marked it as verified.
Status: RESOLVED → VERIFIED
Shanjian, just one thing: Regarding to Yuying's testcases mentioned in http://bugscape.netscape.com/show_bug.cgi?id=20050#c26 The one with frame (http://babel/tests/browser/form/frame.html), after form submission, turning on auto-detector which triggered a reload doesn't give out the warning message. But in case the page is not with frame http://babel/tests/browser/form/gb2312_simpleform.html (see the POST part) The warning message is given out when auto detector is turned on and reload is triggered. Could you explain why?
Yuying's test case is different from the cmb one. In her case, the frameset is not post document. Once you select reload, because the frameset doc is not POST one, it will be reloaded without any warning. As result, all its child frame will be reloaded. Does it sound reasonable to you?
Yes, thanks for the explanation!
Comment on attachment 99957 [details] [diff] [review] put null check to patch 2. a=valeski (recieved verbal approval from jud) for checkin to the 1.0 branch. pls check this is in asap, then replace the "mozilla1.0.2+" with the "fixed1.0.2" keyword. thanks!
Attachment #99957 - Flags: approval+
Whiteboard: [adt1] [ETA 09/21] [Needs Reviews] → [adt1] [ETA 09/21] [Needs Approvals]
adt1.0.2+ (on ADT's behalf) approval from checkin to the 1.0. branch, pending Drivers' approval. Once you have Drivers' approval, pls checkin asap, then replace the "mozilla1.0.2+" keyword with "fixed1.0.2". thanks!
Keywords: adt1.0.2adt1.0.2+
a=chofmann for 1.0.2
fix checked into branch.
Verified as fixed on 2002-09-20-21-1.0 build.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: