You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2019/08/13 19:38:39 UTC

[GitHub] [trafficcontrol] ocket8888 commented on issue #3868: Prevent Creating Objects With Names that are Numbers.

ocket8888 commented on issue #3868: Prevent Creating Objects With Names that are Numbers.
URL: https://github.com/apache/trafficcontrol/issues/3868#issuecomment-520978071
 
 
   In some endpoint rewrites I'm looking at I handle it in the query parameter case as an ambiguous type, e.g. when a Delivery Service needs to be identified I first check the existence of an ID as passed (assuming the parameter is numeric) and failing that check for an XMLID.
   
   That, of course, doesn't work for path parameters, but then I'm against those, in general. Just wanted to leave that here as a suggestion for future work with ambiguously-typed identifiers in query parameters.
   
   Of course, that also still has the problem of a collision, where an object's name is numeric and happens to be exactly the ID of a different object of the same type. Still not sure how to handle that (although restricting numeric names would certainly work).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services