webcompat / web-bugs

A place to report bugs on websites.
https://webcompat.com
Mozilla Public License 2.0
747 stars 67 forks source link

donors.vitalant.org - Firefox is an unsupported browser #80483

Open webcompat-bot opened 3 years ago

webcompat-bot commented 3 years ago

URL: https://donors.vitalant.org/dwp/docs_ext/en_US/not_supported_mob_browser.html

Browser / Version: Firefox iOS 34.2 Operating System: iOS 14.6 Tested Another Browser: Yes Safari

Problem type: Something else Description: Firefox on iOS unsupported on this ‘vitalant.org’ blood donation login portal. Steps to Reproduce:

  1. Go to https://vitalant.org.
  2. Press login button at top right.
  3. Enter zip code (70506 in my case) and continue. I guess different zip codes means different portals, so you may need to test with my zip.
  4. The page will reload, then click login button again on latest iOS Firefox browser.
  5. The login portal tells you that Firefox is not supported - only Safari and Chrome for mobile.

Additional:

Danke

View the screenshot Screenshot
Browser Configuration
  • None

From webcompat.com with ❤️

softvision-raul-bucata commented 3 years ago

We appreciate your report. I was able to reproduce the issue. Firefox is an unsupported browser:

Screenshot_24

Notes:

  1. Reproducible regardless of the status of ETP
  2. Reproducible on the latest build of Firefox Nightly
  3. Works as expected using Safari: Screenshot_26

Tested with: Browser/Version: Safari 14.6/ Firefox Daylight 35.0 (5448) Operating System: iOS 14.6

Moving this to NeedsDiagnosis for further investigations.

karlcow commented 3 years ago

This is user agent sniffing The first redirection is

HTTP/1.1 302 Found : Moved Temporarily
Location: https://donors.vitalant.org/dwp/portal/dwa
Connection: close
Cache-Control: no-cache
Pragma: no-cache

then there is a script checkBrowser

    <script type="text/javascript">

        function checkBrowser(permittedBrowsers) {

            try {
                var res = param.split("==");

                var desctopEnv = true;
                if( (navigator.platform.indexOf("iPhone") != -1) 
                        || (navigator.platform.indexOf("iPod") != -1)
                        || (navigator.platform.indexOf("iPad") != -1)) {

                    desctopEnv = false;
                } else if((navigator.platform.indexOf("Android") != -1)
                    || (navigator.platform.indexOf("Linux armv7l") != -1)
                    || (navigator.platform.indexOf("Linux armv8l") != -1)){ 

                    desctopEnv = false;
                }               

                if(desctopEnv) {
                    var desktop = res[0];                       
                    desktop = desktop.substring(8);

                    var suportedDBrowsers = desktop.split(";");
                    var version = 0;
                    for (i = 0; i < suportedDBrowsers.length; i++) { 
                        if(suportedDBrowsers[i].indexOf(bowser.name.toUpperCase()) > -1) {                              
                            version = suportedDBrowsers[i].split("-")[1];                               
                            break;
                        }
                    }

                    var versionF = parseFloat(version);
                    var bowserVersionF = parseFloat(bowser.version);

                    if(versionF == 0 || bowserVersionF < versionF) {
                        window.open ('/dwp/docs_ext/en_US/not_supported_browser.html','_self',false);
                    }

                } else {
                    var mobile = res[1];
                    mobile = mobile.substring(7);

                    var suportedMBrowsers = mobile.split(";");

                    var version = 0;
                    for (i = 0; i < suportedMBrowsers.length; i++) { 
                        if(suportedMBrowsers[i].indexOf(bowser.name.toUpperCase()) > -1) {                              
                            version = suportedMBrowsers[i].split("-")[1];                               
                            break;
                        }
                    }

                    var versionF = parseFloat(version);
                    var bowserVersionF = parseFloat(bowser.version);

                    if(versionF == 0 || bowserVersionF < versionF) {                        
                        window.open ('/dwp/docs_ext/en_US/not_supported_mob_browser.html','_self',false);
                    }

                }
            }
            catch(err) {                
                window.open ('/dwp/docs_ext/en_US/not_supported_browser.html','_self',false);
            }           
        }

        function isEmpty(val) {
            return (val === undefined || val == null || val.length <= 0) ? true
                    : false;
        } 

        //var param = 'DESCTOP:CHROME-59.0;FIREFOX-54.0;INTERNET EXPLORER-11.0==MOBILE:CHROME-59.0;APPLE SAFARI-9.0';   
        var param = 'DESKTOP:MICROSOFT EDGE-15.0;INTERNET EXPLORER-11.0;FIREFOX-50.0;CHROME-50.0;OPERA-40;YANDEX BROWSER-12.0;SAFARI-5.1==MOBILE:CHROME-50.0;APPLE SAFARI-12.0;SAMSUNG INTERNET FOR ANDROID-13.0;ANDROID WEBVIEW-89.0;AMAZON SILK-88.0';

        if(!isEmpty(param)) {           
            checkBrowser(param);
        }

    </script>
webcompat-bot commented 3 years ago

Generate outreach template