From nobody Sun Dec 25 01:42:43 2022 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NfkFZ14vDz1HWJS for ; Sun, 25 Dec 2022 01:42:58 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NfkFY229yz3j1h for ; Sun, 25 Dec 2022 01:42:57 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=BZgW9Hjc; spf=pass (mx1.freebsd.org: domain of aryeh.friedman@gmail.com designates 2a00:1450:4864:20::62a as permitted sender) smtp.mailfrom=aryeh.friedman@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x62a.google.com with SMTP id jo4so19908402ejb.7 for ; Sat, 24 Dec 2022 17:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=wByNrIoRAYCRF8XWLoVGEa+CGVLW7i8fBH4gL8ooKJw=; b=BZgW9Hjc8lcCQP+iqQrqKm0kdQFSz17DDqZFqjnpnwZq/zN187EfsJIBPht///BYSQ ISRtNmXJSrZrAIVpNW6ULg4NKGIIUJEiDRuMD/KeAVMNwJ5n5PtOYRTG7ubaaderQnqs 5fpN3vsFdZQv38xrlTc9JQdiSJhjoy3yGhEto9DBv9lt84xUqJ0wThdZeQziqK+fVW9M rIn20UfwlaFmOZdiDq78xVdEmsWApDqiLgUIi5AbBN/uDzwZYvzhac3QRtgtts7c6nZ9 QjMicnAf1W8HTdLF7n2ThdCm9sPwoRSxeiDMtcHpfOiHKBkETqHm3Ob64QBdcmOUXAV2 /s4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wByNrIoRAYCRF8XWLoVGEa+CGVLW7i8fBH4gL8ooKJw=; b=ZcPOuJveJMXnO9LsvqjPfp60fJDDuPsDj5q5g2B9Fn5n2o0T6sGE6mdQe9lOqUbcl0 lB6w5LaYShCA5eQtWJdVuO4lvjL3hQW8W1vrsrfPN/zcnODCTPwcJZMrBWdeON2p0j1G 8vXqzZsdF1/R+kHv5kCjBWJ0EcLcXGOXzjZ9uiZfPzkhdGClFg2JE2vFiZsdphOKOtIx Z3sfDS5BJ54cMtVik0Y5zGsS0LW+O4/HXHZZqme9CBIDf94zHXGlcmRh9wzxMbfJMaZQ jIydtis/OUNmmODuvMOKAiGDsha5n4sYt8xk4iOW4WRF8m/wpT1PGf64AUVMHnAHo0uJ imjw== X-Gm-Message-State: AFqh2kpH4mBbu4VvRmwcxS7clDpsoWPc6y7Olv11X+Z2ULVw1ODkWsyx Mk12FwmVs7Bzww3tJykjLUZQ1A/1tZ6buj1ZdOoCt+jvC9ofDg== X-Google-Smtp-Source: AMrXdXt4vlrZvIRmNh38mBWdmg966rfb3hRLUGBN85XZZ/j6mMkmVaGODdAKbbEMtb2pUrSHf/UorULR7jlcAiouSE0= X-Received: by 2002:a17:907:d084:b0:846:5ef2:2aa7 with SMTP id vc4-20020a170907d08400b008465ef22aa7mr1253084ejc.28.1671932574892; Sat, 24 Dec 2022 17:42:54 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: <20221223120153244758626@bob.proulx.com> <20221224112249N@bob.proulx.com> In-Reply-To: <20221224112249N@bob.proulx.com> From: Aryeh Friedman Date: Sat, 24 Dec 2022 20:42:43 -0500 Message-ID: Subject: Re: Slight OT: Making Firefox behave the same on FreeBSD and windows To: FreeBSD Mailing List Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.92)[-0.925]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62a:from]; ARC_NA(0.00)[]; TAGGED_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4NfkFY229yz3j1h X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Top quoting since my reply is not directly related to the actual body of the message I am replying to. Note more direct replies are inline. It seems like there are enough people with this issue that if we complain collectively (petition?) to chase that they might fix the problem on their end. Now the question is this a framework issue for them and if so who made the framework (i.e. so other sites work also) and we should complain to them. Correctly parsing user agent is f**king trivial for example here is some Java I wrote for a video project to detect browser/OS combos (for some whacked out reason Quicktime/MOV can't be played in Safari on a iPhone [works on a Mac] in any mode beyond a full download before play starts): // src/java/org/petitecloud/pcutil/web/video/OsGui.java package org.petitecloud.pcutil.web.video; import java.util.Collections; import java.util.List; import org.petitecloud.util.ArrayUtil; /** * Enum constants representing operating systems (and their GUIs) * * Copyright (C) 2022 Friedman-Nixon-Wong Enterprises, LLC & contributors * * @author dnixon * @version Sat Jul 2 03:05:20 EDT 2022 */ public enum OsGui implements UserAgentItem { ANDROID(new String[] {"android"}, new String[] {}, true) { @Override public boolean usesAjax(Browser b) { return b==Browser.CHROME; } }, IPHONE(new String[] {"iphone"}, new String[] {}, true) { @Override public boolean allowsChunking(Browser b) { return true; } }, MAC(new String[] {"mac os"}, new String[] {"iphone"}, false) { }, XORG(new String[] {"linux", "freebsd"}, new String[] {"android"}, false) { }, WINDOWS(new String[] {"windows"}, new String[] {}, false) { @Override public final boolean allowsChunking(Browser b) { if ( Browser.EDGE == b ) return false; return super.allowsChunking(b); } // END method allowsChunking }; .... } // END *** enum OsGui public enum Browser implements UserAgentItem { CHROME(new String[] {"chrome", "crios"}, new String[] {"edg"}) { @Override public boolean delayPrelimVideoSrcAssignment(OsGui gui) { return gui==OsGui.ANDROID; } }, // END *** CHROME EDGE(new String[] {"edg"}, new String[] {}) { @Override public final boolean needsDirectLinkAsJSAssignment( OsGui osGui) { return true; } // END *** method needsDirectLinkAsJSAssignment }, // END *** EDGE FIREFOX(new String[] {"firefox", "fxios"}, new String[] {}) { }, // END *** FIREFOX SAFARI(new String[] {"safari"}, new String[] {"chrome", "edg", "crios", "fxios"}) { @Override public final boolean allowsLinkTagParamFetch(OsGui osGui) { return osGui == OsGui.MAC; } // END *** method allowsLinkTagPAramFetch }; // END *** SAFARI ... } // END *** enum Browser On Sat, Dec 24, 2022 at 2:41 PM Bob Proulx wrote: > > Kevin Oberman wrote: > > Bob Proulx wrote: > > > parv/FreeBSD wrote: > > > > Chris Hill wrote: > > > > > I had the same issue with a Chase account. It seems that they object to > > > > > seeing "FreeBSD" in the user agent string. I used one of the many > > > > > plug-ins to change the string for that site, so my machine would appear > > > > > to be running Linux. It works well. > > This is definitely our client side workaround to this problem. The > next thing would be to complain to sites that UserAgent is not > something that should be used for security blockage! It's not actual > security. It's simply annoying. The only reason for even detecting browser/OS combos is to handle any local oddballness. This goes along with the attitude many "modern" developers have of "linux==UNIX and [all other unix's]!=UNIX". I have seen it go so far as some online games (e.g. forge of empires) turn off graphics acceleration if they don't recognize the OS thus making the game unplayable (5 to 10 load times and 30 sec to 1 min response times). -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org