frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Be Careful with GIDs in Rails

https://blog.julik.nl/2025/12/a-trap-with-global-ids
23•julik•5d ago

Comments

moondowner•2h ago
Any popular Rails apps that use to_global_id?
kayodelycaon•1h ago
The built-in ActiveJob api uses them.
rmosolgo•1h ago
Shopify: https://shopify.dev/docs/api/usage/gids#global-id-structure
hahahacorn•1h ago
Shopify https://shopify.dev/docs/api/usage/gids
philipallstar•2h ago
This title is odd, given the actual identified problem seems to be LLMs writing code.
claudiug•1h ago
yeah, but if you say LLM is shit, and not rails... goodbye views :)
hopeless•1h ago
A bit of a bizarre post since to_sgid has existed forever to generate signed global ids. Global IDs are probably one the most powerful and underrated features of Rails but regular global ids are only supposed to be used internally (e.g. job params) and never sent to the client.

If there’s a gotcha it’s that _signed_ global ids are only signed, not encrypted, and very few people seem to know about the optimised method (globalid::Locator.locate_many) for loading a batch of global ids

kayodelycaon•1h ago
Rails is a dangerous place to be throwing random data into APIs.
usernamed7•1h ago
the AI hallucinated and somehow it's rails fault?

GID's are great - i think the issue is with how they leveraged rubyLLM for something they should inherently not be using LLMs for.

> Remember that GIDs were made for facilitating ActiveJob serialization - they are a system-level facility, not a product-level facility.

I think this is somewhat obvious given the signature like gid://awesome-app/Post/32; there is no scoping to the user or account so it should be treated like a global lookup. If you need scoping to a user/account you can build that.

Honestly I think this is a matter of the author using poor design decisions and over leveraging LLMs. But this is not the fault of Rails, it is working as expected.

Be careful with LLMs!

config_yml•1h ago
> GIDs are not checked for authorization when doing the lookup - they are meant to be generated above the authorization layer, and to be consumed above the authorization layer

Then the problem with this post boils down to applying the authorization layer in any tool call, just like you do in controllers. Seems obvious?

otikik•49m ago
If you don't want invoice 22 to be shown by someone putting 22 on the url, you definetly need to enforce permissions on your app. The Global ID issue is tangential to that.

This is not the future

https://blog.mathieui.net/this-is-not-the-future.html
189•ericdanielski•1h ago•67 comments

40 percent of fMRI signals do not correspond to actual brain activity

https://www.tum.de/en/news-and-events/all-news/press-releases/details/40-percent-of-mri-signals-d...
108•geox•1h ago•39 comments

Rust GCC back end: Why and how

https://blog.guillaume-gomez.fr/articles/2025-12-15+Rust+GCC+backend%3A+Why+and+how
41•ahlCVA•1h ago•13 comments

Full Unicode Search at 50× ICU Speed with AVX‑512

https://ashvardanian.com/posts/search-utf8/
77•ashvardanian•22h ago•37 comments

I don't think Lindley's paradox supports p-circling

https://vilgot-huhn.github.io/mywebsite/posts/20251206_p_circle_lindley/
15•speckx•1h ago•1 comments

You're overspending because you lack values

https://www.sherryning.com/p/youre-overspending-because-you-lack-values
31•speckx•1h ago•10 comments

Put a ring on it: a lock-free MPMC ring buffer

https://h4x0r.org/ring/
30•signa11•1h ago•12 comments

SHARP, an approach to photorealistic view synthesis from a single image

https://apple.github.io/ml-sharp/
405•dvrp•11h ago•93 comments

A2UI: A Protocol for Agent-Driven Interfaces

https://a2ui.org/
96•makeramen•5h ago•28 comments

Sega Channel: VGHF Recovers over 100 Sega Channel ROMs (and More)

https://gamehistory.org/segachannel/
22•wicket•2h ago•1 comments

Children with cancer scammed out of millions fundraised for their treatment

https://www.bbc.com/news/articles/ckgz318y8elo
410•1659447091•8h ago•330 comments

Cekura (YC F24) Is Hiring

https://www.ycombinator.com/companies/cekura-ai/jobs/YFeQADI-product-engineer-us
1•atarus•3h ago

Be Careful with GIDs in Rails

https://blog.julik.nl/2025/12/a-trap-with-global-ids
23•julik•5d ago•11 comments

Quill OS: An open-source OS for Kobo's eReaders

https://quill-os.org/
358•Curiositry•14h ago•116 comments

Bonsai: A Voxel Engine, from scratch

https://github.com/scallyw4g/bonsai
138•jesse__•9h ago•24 comments

A brief history of Times New Roman

https://typographyforlawyers.com/a-brief-history-of-times-new-roman.html
15•tosh•1h ago•2 comments

ArkhamMirror: Airgapped investigation platform with CIA-style hypothesis testing

https://github.com/mantisfury/ArkhamMirror
58•ArkhamMirror•5h ago•26 comments

Purrtran – ᓚᘏᗢ – A Programming Language for Cat People

https://github.com/cmontella/purrtran
19•simonpure•2d ago•2 comments

High Performance SSH/SCP

https://www.psc.edu/hpn-ssh-home/
47•gslin•5d ago•22 comments

Mozilla's new CEO is doubling down on an AI future for Firefox

https://www.theverge.com/tech/845216/mozilla-ceo-anthony-enzor-demeo
10•latexr•26m ago•8 comments

A linear-time alternative for Dimensionality Reduction and fast visualisation

https://medium.com/@roman.f/a-linear-time-alternative-to-t-sne-for-dimensionality-reduction-and-f...
86•romanfll•8h ago•28 comments

Erdős Problem #1026

https://terrytao.wordpress.com/2025/12/08/the-story-of-erdos-problem-126/
126•tzury•10h ago•18 comments

“Are you the one?” is free money

https://blog.owenlacey.dev/posts/are-you-the-one-is-free-money/
405•samwho•4d ago•99 comments

Internal RFCs saved us months of wasted work

https://highimpactengineering.substack.com/p/the-illusion-of-shared-understanding
71•romannikolaev•5d ago•50 comments

8M users' AI conversations sold for profit by "privacy" extensions

https://www.koi.ai/blog/urban-vpn-browser-extension-ai-conversations-data-collection
647•takira•12h ago•209 comments

Creating C closures from Lua closures

https://lowkpro.com/blog/creating-c-closures-from-lua-closures.html
47•publicdebates•4d ago•11 comments

Mathematicians Crack a Fractal Conjecture on Chaos

https://www.scientificamerican.com/article/mathematicians-crack-a-fractal-conjecture-on-chaos/
4•mikhael•6d ago•3 comments

Native vs. emulation: World of Warcraft game performance on Snapdragon X Elite

https://rkblog.dev/posts/pc-hardware/pc-on-arm/x86_versus_arm_native_game/
92•geekman7473•15h ago•42 comments

Show HN: I designed my own 3D printer motherboard

https://github.com/KaiPereira/Cheetah-MX4-Mini
98•kaipereira•1w ago•26 comments

Economics of Orbital vs. Terrestrial Data Centers

https://andrewmccalip.com/space-datacenters
155•flinner•17h ago•208 comments