Bug 274224
| Summary: | REGRESSION (276904@main): Breaks https://www.tax.ny.gov/online/. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
| Component: | JavaScriptCore | Assignee: | Yijia Huang <yijia_huang> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | karlcow, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=271946 https://bugs.webkit.org/show_bug.cgi?id=272082 https://bugs.webkit.org/show_bug.cgi?id=274225 |
||
Mark Lam
Steps to reproduce:
1. Navigate to https://www.tax.ny.gov/online/
2. Click Log in
3. Observe "Network connection was lost" error message or blank white page.
This reproduces in MiniBrowser with 276904@main or later.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Mark Lam
This is caused by https://bugs.webkit.org/show_bug.cgi?id=271946.
Radar WebKit Bug Importer
<rdar://problem/128149232>
Mark Lam
We'll have to revert the following:
https://commits.webkit.org/276904@main
https://commits.webkit.org/277023@main
Mark Lam
The previous changes were reverted in 278825@main. See https://bugs.webkit.org/show_bug.cgi?id=274225.
Mark Lam
Honestly, I'm not sure if this is actually a bug in this PR. From my debugging, if I make the getter not prepend "get " to its name, the issue stops reproducing. Meanwhile, Chrome and Firefox all do not implement the spec in https://tc39.es/ecma262/#sec-function.prototype.tostring, and hence, do appear to hit this issue. For example, on Firefox,
```
String(Object.getOwnPropertyDescriptor((function() { "use strict"; }).__proto__, "caller").get)
```
... yields:
```
"function caller() {
[native code]
}"
```
Maybe someone needs to tell https://www.tax.ny.gov/online to fix their site, or we need more consensus support from Chrome and Firefox in order to land this.
Karl Dubost
Mark,
I do not have login access to https://www.tax.ny.gov/online
Could you identify which part of the code triggers the bug?
Testing with:
Safari Technology Preview 191 20619.1.6.3
Firefox Nightly 128.0a1 12824.5.19
Google Chrome Canary 127.0.6495.0 6495.0
So this:
String(Object.getOwnPropertyDescriptor((function() { "use strict"; }).__proto__, "caller").get)
Safari returns
"function caller() {
[native code]
}"
Firefox returns
"function caller() {
[native code]
}"
Chrome returns
'function () { [native code] }'
Mark Lam
(In reply to Karl Dubost from comment #6)
> Mark,
>
> I do not have login access to https://www.tax.ny.gov/online
> Could you identify which part of the code triggers the bug?
I do not have login access to https://www.tax.ny.gov/online either, but login access is not required.
Before 276904@main, trying to login will get some activity on https://www.tax.ny.gov/online.
After 276904@main, trying to login gives you a "blank white page".
The only change in 276904@main is to rename a getter function:
function input() { ...
should be:
function get input() { ...
This is in accordance to the ECMA262 spec. However, after that change in 276904@main (which makes us spec compliant), https://www.tax.ny.gov/online starts showing the "blank white page" on login attempts. What we need to find out here is why that website does not like the spec compliant behavior.
Karl Dubost
Given that Firefox returns the same thing than Safari, I wonder if it fails in Firefox too.
So on STP Release 198 (Safari 18.0, WebKit 20619.1.20.7)
1. Go to https://www.tax.ny.gov/online/
2. Click on Login button
Result:
The site opens a new tab with https://my.ny.gov/LoginV4/login.xhtml?APP=nyappdtf
No blank page at the end. (it just takes time 1s to 3s while the page is blank)
Same behavior and delay on
* Chrome Canary Version 128.0.6598.0 (Official Build) canary (arm64)
* Firefox Nightly 128.0 (64 bits)
* Working also on a recent internal version of Safari
Mark,
does it still happen for you?
which version?
Karl Dubost
comment #8
So my bad, I had forgotten that the change had been reverted so it's normal this is working.
Karl Dubost
comment #8
So my bad, I had forgotten that the change had been reverted so it's normal this is working.
Karl Dubost
I'm confused with this bug.
Object.getOwnPropertyDescriptor(Document.prototype, 'title').get.toString()
Chrome: 'function get title() { [native code] }'
Firefox:
"function title() {
[native code]
}"
Safari:
"function title() {
[native code]
}"
In the current state. So Chrome does return the `get`
and it is working with the https://www.tax.ny.gov/online/
Now, I also tested by setting Chrome with the UA string for Safari.
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15'
And this is still working.
if I set Safari with the Chrome UA
Then it fails.
So I suspect there is some user agent sniffing going on.
which adjusts to the expected string, but I'm not sure where in the code.
That also means we can't fix it except by doing a Quirk.
Proposal:
We re-land the code with set/get and a quirk in the same patch.
which removes the set/get just for this site.
And we start an outreach effort to make them change.
Yijia Huang
Pull request: https://github.com/WebKit/WebKit/pull/30980
Karl Dubost
We are also in the process of contacting them through radar 132049502
And hopefully we will not have to implement a Quirk.
Yijia Huang
Pull request: https://github.com/WebKit/WebKit/pull/32950
Yijia Huang
Pull request: https://github.com/WebKit/WebKit/pull/39468
EWS
Committed 289786@main (e4a6a6964d55): <https://commits.webkit.org/289786@main>
Reviewed commits have been landed. Closing PR #39468 and removing active labels.