Open Bug 2006036 Opened 3 months ago Updated 1 month ago

fbo.fubon.com - Unsupported browser warning blocks access to the page

Categories

(Web Compatibility :: Site Reports, defect, P1)

Desktop
Windows 10

Tracking

(Webcompat Priority:P3, Webcompat Score:1, firefox146 affected, firefox147 affected, firefox148 affected)

ASSIGNED
Webcompat Priority P3
Webcompat Score 1
Tracking Status
firefox146 --- affected
firefox147 --- affected
firefox148 --- affected

People

(Reporter: rbucata, Assigned: twisniewski)

References

(Depends on 1 open bug, )

Details

(5 keywords, Whiteboard: [webcompat-source:web-bugs])

User Story

platform:windows,mac,linux,android
impact:blocked
configuration:general
affects:all
branch:release
diagnosis-team:webcompat
user-impact-score:0

Attachments

(3 files)

Environment:
Operating system: Windows 10
Firefox version: Firefox 146.0

Steps to reproduce:

  1. Navigate to: https://fbo.fubon.com/fboPortal/index.jsp
  2. Observe

Expected Behavior:
The page loads

Actual Behavior:
Unsupported Browser warning message blocks access

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in firefox-nightly, and firefox-release
  • Does not reproduce in chrome

Created from https://github.com/webcompat/web-bugs/issues/195275

Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.

Severity: -- → S2
User Story: (updated)
Webcompat Priority: --- → P1
Webcompat Score: --- → 9
Priority: -- → P1
Webcompat Score: 9 → 8

ChromeMask doesn't work here because the site is using client hints to detect Chrome:

  // 判斷是否有 Client Hints,並額外處理brave瀏覽器
            if (navigator.userAgentData && navigator.userAgentData.brands) {

                // 【路徑 A】有 Client Hints 的瀏覽器 (Chrome, Edge, Brave...)
                try {
                    var brands = navigator.userAgentData.brands.map(function(b) { return b.brand.toLowerCase(); });
                    var isBrave = brands.indexOf("brave") > -1;

                    if (isBrave) {
                        // 1. 如果是 Brave,明確拒絕
                        console.warn("Brave browser blocked by Client Hints.");
                        browserIsAllowed = false;
                    } else {
                        // 2. 如果不是 Brave,檢查是否為 Chrome 或 Edge
                        var platform = navigator.userAgentData.platform.toLowerCase();
                        var hasAllowedBrand = brands.indexOf("google chrome") > -1 || brands.indexOf("microsoft edge") > -1;
                        var allowedPlatforms = ["windows", "macos", "android"];
                        var hasAllowedPlatform = allowedPlatforms.includes(platform);

                        if (hasAllowedBrand && hasAllowedPlatform && checkCoreFeatures()) {
                            browserIsAllowed = true;
                        }
                    }
                } catch (e) {
                    console.warn("Client Hints check error:", e);
                    browserIsAllowed = false; // 出錯則不允許
                }

            } else {

                // 【路徑 B】沒有 Client Hints 的瀏覽器 (Safari, Firefox...)
                var isEdgePC = ua.indexOf("edg") > -1;
                var isChrome = ua.indexOf("chrome") > -1 && !isEdgePC;
                var isSafari = ua.indexOf("safari") > -1 && ua.indexOf("version") > -1 && !isChrome && !isEdgePC;

                // 主要目標是放行 Safari 和 Edge 的 iOS/Android 版
                var isEdgeIos = ua.indexOf("edgios") > -1;
                var isEdgeAndroid = ua.indexOf("edga") > -1;
                var isChromeIos = ua.indexOf("crios") > -1;


                if ((isSafari || isEdgePC || isEdgeIos || isEdgeAndroid || isChromeIos) && checkCoreFeatures()) {
                    browserIsAllowed = true;
                }
            }
See Also: → 1750143

Even if we spoof userAgentData, the site won't load. They're doing some.. interesting stuff with XMLHttpRequests which causes Firefox to break on purpose, and even then it breaks if we avoid the line which sets a timeout on a sync XHR (which isn't allowed and causes an exception):

		this.portRequest.open('POST', this.SendURL, false); //FIXME(TWCA) 待確認同步模式
			if (userAgent.indexOf("Firefox") > -1) {
				this.portRequest.timeout = 1000;
			}

I think we'll need to diagnose more fully here. But I can at least post a patch which lets us test further, so I'll do so.

Keywords: leave-open
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Regressions: 2017880

They are blocking Linux now, even on Chrome. I'll adjust the intervention to not bother applying on Linux, since it doesn't achieve anything.

User Story: (updated)
Webcompat Priority: P1 → P3
Webcompat Score: 8 → 1
Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4f83d4bdf28e https://hg.mozilla.org/integration/autoland/rev/10d2d19a7ab0 don't bother with a UA override for fbo.fubon.com on Linux; r=webcompat-reviewers,denschub

Reverted this because it was causing mochitests failures in browser_ua_helpers.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/extensions/webcompat/tests/browser/browser_ua_helpers.js | test_ua_helpers - getDeviceAppropriateChromeUA({"ua":"Linux","config":{"OS":"windows","noFxQuantum":true},"expected":"Mozilla/5.0 (Windows NT 11.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"}) - Got "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36",
Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/afcfcd93d96e https://hg.mozilla.org/integration/autoland/rev/ce14aa02e1a0 don't bother with a UA override for fbo.fubon.com on Linux; r=webcompat-reviewers,denschub
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: