News for hackers. Stuff that matters.
Re:Things you should do now (2011) by tpetry on Friday February 19, 2021 @04:08AM (#26191083)
A better tip would be to use something like time-ordered uuids: You can‘t misuse them for something different and the added bonus is that no one can iterate your db records by just incrementing the url.
Re:Things you should do now (2011) by codingdave on Friday February 19, 2021 @06:44AM (#26192080)
If you are implying that having an un-guessable URL secures your data, you might want to reconsider that approach. Your data should be secured server-side based on the actual auth in your app.
Re:Things you should do now (2011) by derwiki on Friday February 19, 2021 @09:50AM (#26193730)
Not the OP but I read it as “much harder to scrape” than making it Secure. Which has some value.
Re:Things you should do now (2011) by Cthulhu_ on Friday February 19, 2021 @04:15AM (#26191116)
My main gripe with UUIDs at the moment is that they look ugly in urls :/
Re:Things you should do now (2011) by ozim on Friday February 19, 2021 @06:19AM (#26191894)
You should not use your database identifiers in urls anyway.
Re:Things you should do now (2011) by krab on Friday February 19, 2021 @05:03AM (#26191376)
You can encode it to a shorter string if you use larger alphabet. Still, it's 16 bytes of information, so not as short as sequential IDs.

See for example https://pypi.org/project/shortuuid/

    >>> shortuuid.uuid()
    'vytxeTZskVKR7C7WgdSP3d'
Re:Things you should do now (2011) by ivanbakel on Friday February 19, 2021 @05:47AM (#26191665)
Those shorter strings can come with their own caveats. Long-form UUIDs have the nice property of being URL-safe - but IIRC, path pieces in HTTP urls are not meant to be case-sensitive, and browsers have historically tried to "help" by re-casing URLs. For correct semantics, short UUIDs have to go in the request parameters instead.
Re:Things you should do now (2011) by hansvm on Friday February 19, 2021 @10:45AM (#26194331)
Most of the url (including the path pieces) is supposed to be case sensitive unless otherwise specified for a given protocol (and treating e.g. %3A the same as %3a). This should be the most recent RFC on the topic: https://tools.ietf.org/html/rfc3986#section-6.2.2.1
Re:Things you should do now (2011) by account42 on Friday February 19, 2021 @09:37AM (#26193577)
> IRC, path pieces in HTTP urls are not meant to be case-sensitive, and browsers have historically tried to "help" by re-casing URLs.

That would break with any webserver that is serving files from a case-sensitive filesystem. Which is most of them.

Re:Things you should do now (2011) by Deadron on Friday February 19, 2021 @10:36AM (#26194233)
Windows....enough said.
Re:Things you should do now (2011) by pretzelhands on Friday February 19, 2021 @04:43AM (#26191270)
They're not the prettiest sight, yes, but I think anyone who isn't in some way a geek particularly cares about what's actually in URLs.

There's a reason why Apple got away with only showing the hostname of a URL: It doesn't matter to ordinary people. :)