News for hackers. Stuff that matters.
Re:Version 100 in Chrome and Firefox by ethbr0 on Tuesday February 15, 2022 @01:35PM (#30350685)
What kind of crap user-agent parsing library are people using that breaks from 2 to 3 digits?

If that was a bug, I'd be pretty suspicious about the general software quality in the rest of the library.

Re:Version 100 in Chrome and Firefox by Someone on Tuesday February 15, 2022 @04:48PM (#30353233)
I think you’ll find all kinds of ‘libraries’ for doing that, especially in small embedded devices with a web front-end.

I also fear there’s software that correctly extracts all the digits of the version in the user agent, but then compares it as a string with a given version. That would get you

   “100” < “99”
Re:Version 100 in Chrome and Firefox by cpeterso on Tuesday February 15, 2022 @05:03PM (#30353435)
Here's a real example of that bug:

Slack's message buttons (such as "Add reaction" or "Reply in thread") stopped working for Firefox versions >= 100 and <= 519. They mysteriously started working again for versions >= 520. The version string "100" compared as smaller than "52" in Slack's code, which activated some kind of webcompat workaround intended for Firefox versions < 52 that breaks on more recent Firefox versions.

https://github.com/webcompat/web-bugs/issues/67866

Re:Version 100 in Chrome and Firefox by samwillis on Tuesday February 15, 2022 @01:37PM (#30350718)
This is the same field that thought they could save a year as two digits and didn't think their software would still be in use 30 years later.

It's not crap, it's just short sighted.

Re:Version 100 in Chrome and Firefox by ethbr0 on Tuesday February 15, 2022 @01:46PM (#30350864)
True, but user-agent was 1996(?). By then, we weren't talking about limited mainframe storage devices.

It just baffles that someone can look at a monotonically increasing number, defined and incremented by a third party, and say "That will never be 3 digits."

Re:Version 100 in Chrome and Firefox by Beltalowda on Tuesday February 15, 2022 @02:31PM (#30351455)
I'd wager it's mostly fixed string indexes, regular expressions ("\d{2}"), and things like that. Maybe also some people with a "varchar(2)" column in the database.

A lot of software is written by junior programmers, not infrequently in a hurry. It's an easy mistake to make and if you've been bitten by it once you'll remember it, but many people have never been bitten by it.

Re:Version 100 in Chrome and Firefox by skykooler on Tuesday February 15, 2022 @03:50PM (#30352510)
Well, keep in mind that major version numbers used to change slowly. In the first ten years Firefox existed, it went from version 0.1 to version 5.0. At that pace, it would have taken two hundred years to hit a three-digit major version. In my opinion, browser vendors brought this upon themselves by changing what "major version" meant.
Re:Version 100 in Chrome and Firefox by larrik on Tuesday February 15, 2022 @01:44PM (#30350834)
To be fair, in 1970 those 2 digits were very expensive. It was a calculated tradeoff at worst.
Re:Version 100 in Chrome and Firefox by cesarb on Tuesday February 15, 2022 @02:30PM (#30351441)
> To be fair, in 1970 those 2 digits were very expensive.

More than just "very expensive". Often, you were limited to exactly 80 columns for each record. If you had for instance three dates on one record, using 2 digits instead of 4 digits saved 6 columns, which is over 7% of the available space.

Re:Version 100 in Chrome and Firefox by lmkg on Tuesday February 15, 2022 @01:52PM (#30350965)
I wouldn't be so confident that the code is coming from a library. We take code distribution for granted these days, but some fraction of the web today was built when the only way to get anything done was hand-rolled perl scripts.
Re:Version 100 in Chrome and Firefox by petercooper on Tuesday February 15, 2022 @03:12PM (#30351990)
I admit it's crap, but I once added a temporary fix to a system of mine that blocked clients with a user agent matching "Chrome 54" (at the string level) due to a bot (I know it's not ideal, but it worked in the moment, and genuine users were no longer using such an old version). I doubt Chrome 540 would turn up any time soon, but I can picture other folks having done similar things with "Chrome 12", say, and wondering why things fail with Chrome 120(!)
Re:Version 100 in Chrome and Firefox by glandium on Tuesday February 15, 2022 @04:30PM (#30353010)
That's the speculated reason why Microsoft had to skip Windows 9: because in the late 90s, software were checking for «starts with "Windows 9"» to identify Windows 95 and 98... and some of those checks still exist and would had identified Windows 9 as Windows 95/98.
Re:Version 100 in Chrome and Firefox by throwaway932489 on Tuesday February 15, 2022 @02:01PM (#30351072)
"New dependencies need to be approved by xyz"

"Ok"

if(userAgent.includes("Chrome") && userAgent[whatever] >= 4)

Re:Version 100 in Chrome and Firefox by pictur on Tuesday February 15, 2022 @01:37PM (#30350716)
very optimistic point of view.