Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by wilg on Wednesday November 08, 2023 @04:35PM
(#38197428)
This article doesn’t make good on its claim to explain why this “Rails convention” is bad. It’s probably actually good. I wouldn’t have clicked on it otherwise. Rude, IMO.
[ Parent
| on HN ]
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by gaogao on Wednesday November 08, 2023 @04:40PM
(#38197494)
It's pretty common outside of rails too, like https://facebook.com/4
Some main weaknesses, if I recall correctly, is that's incremental ids make scraping pretty easy, or guessing content outside of a URL given explicitly by the service (like here).
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by david_allison on Wednesday November 08, 2023 @04:49PM
(#38197593)
They also leak metrics (#of registered users)
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by wilg on Wednesday November 08, 2023 @06:04PM
(#38198528)
I think this is the only downside.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by pests on Wednesday November 08, 2023 @08:43PM
(#38199923)
ALTER SEQUENCE "seq_user_id" RESTART WITH 5000000000
Wheres my billion dollars
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by simlevesque on Wednesday November 08, 2023 @04:50PM
(#38197599)
Also, competitors can analyze your growth more easily.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by cartothemax on Wednesday November 08, 2023 @05:04PM
(#38197775)
Yep, you're correct. Panera had an issue where folks could scrap every user profile due to sequential profile ids. The bigger part of the exploit was they just openly exposed user data but making the profiles ids sequential made it really easy to scrap
https://krebsonsecurity.com/2018/04/panerabread-com-leaks-mi...
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by WendyTheWillow on Wednesday November 08, 2023 @05:02PM
(#38197746)
It's "good" if you're enumerating a potential target!
Otherwise, you typically either want to make your URLs intuitively discoverable or not discoverable at all. An incrementing ID like this is neither, so it sits in a weird middle ground that probably satisfies nobody (except those trying to get things done who don't care, I guess).
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by thrownblown on Wednesday November 08, 2023 @05:09PM
(#38197827)
Incrementing a URL can (and has) get you prison time.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by ric2b on Wednesday November 08, 2023 @05:40PM
(#38198245)
In the same way that squeezing on a hunk of metal that some may call a "trigger" can get you convicted for murder.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by WendyTheWillow on Wednesday November 08, 2023 @05:18PM
(#38197949)
The incrementing itself wasn't the issue! It's all the other stuff around their scraping and apparently their provable desire to harm AT&T that got them convicted.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by thrownblown on Wednesday November 08, 2023 @06:01PM
(#38198493)
Definitely not going to argue with you on that. But it did all start with the simple addition to the URL.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by pests on Wednesday November 08, 2023 @08:45PM
(#38199938)
Odd they didn't use his handle. I figured it was weev but never knew his real name.
Re:How Bad Rails Conventions Got Me a Weekend Stay with the ...
by anuraaga on Thursday November 09, 2023 @04:08AM
(#38202696)
I believe this convention was used widely outside of Rails too so it's less a Rails convention and more a late 90s early 2000s convention. Even now I suspect many articles with good SEO will give table creation SQL using auto increment instead of uuid so maybe just software convention.