DEV Community

Discussion on: RESTful Security: Plug the Leaks!

Collapse
 
rhymes profile image
rhymes

Agreed, also don't use internal db ids in the api so the attacker cannot infer the sequencing

Collapse
 
danidee10 profile image
Osaetin Daniel

Yep.It's always good to use a random string or a different Identifier for any public resource.

Collapse
 
neilmadden profile image
Neil Madden

If your external ids are unguessable (e.g., 256-bit random strings) then this attack completely disappears. Another alternative is to only expose /api/accounts/me if there is no valid reason for a user to ever access any other account.