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 2021/09/08 15:35:13 UTC

[GitHub] [trafficcontrol] dmohan001c opened a new issue #6175: POST request to /api/4.0/phys_locations accepts mismatch values for regionName #5562

dmohan001c opened a new issue #6175:
URL: https://github.com/apache/trafficcontrol/issues/6175


   <!--
   ************ STOP!! ************
   If this issue identifies a security vulnerability, DO NOT submit it! Instead, contact
   the Apache Traffic Control Security Team at security@trafficcontrol.apache.org and follow the
   guidelines at https://apache.org/security regarding vulnerability disclosure.
   
   - For *SUPPORT QUESTIONS*, use the #traffic-control channel on the ASF slack (https://s.apache.org/slack-invite)
   or the Traffic Control Users mailing list (send an email to users-subscribe@trafficcontrol.apache.org to subscribe).
   - Before submitting, please **SEARCH GITHUB** for a similar issue or PR
       * https://github.com/apache/trafficcontrol/issues
       * https://github.com/apache/trafficcontrol/pulls
   -->
   ## I'm submitting a
   
   <!-- Do not submit security vulnerabilities or support requests here - see above -->
   ## This Bug Report affects these Traffic Control components:
   <!-- delete all those that don't apply -->
   - Traffic Control Cache Config (T3C, formerly ORT)
   - Traffic Control Client <!-- Please specify which (Python, Go, or Java) -->
   - Traffic Monitor
   - Traffic Ops
   - Traffic Portal
   - Traffic Router
   - Traffic Stats
   - Grove
   - Documentation
   - CDN in a Box
   - Automation <!-- Please specify which (GitHub Actions, Docker images, Ansible Roles, etc.) -->
   - unknown
   
   ## Current behavior:
   When you make a POST request to /phys_locations endpoint in API 4.0, if you pass in the body with id from one region ("region": 1 for Eastern division) and name from another region ("region": "Western"), you get a successful response.
   
   
   ## Expected behavior:
   Request with mismatch ID and name would fail or regionName could be dynamically named based on ID.
   
   ## Minimal reproduction of the problem with instructions:
   all existing regions
   `{
       "response": [
           {
               "divisionName": "Quebec",
               "division": 1,
               "id": 1,
               "lastUpdated": "2021-09-08 15:28:41+00",
               "name": "Montreal"
           },
           {
               "divisionName": "USA",
               "division": 2,
               "id": 2,
               "lastUpdated": "2021-09-08 15:28:41+00",
               "name": "Washington, D.C"
           }
       ]
   }`
   
   POST body --- request made to /phys_locations, with Montreal ID and regionName : Washington, D.C
   `{
       "address": "1234 mile high circle",
       "city": "Denver",
       "poc": "Person",
       "name": "Great_Britain1",
       "regionId": 1,
       "region": "Washington, D.C",
       "shortName": "testphyloc2",
       "state": "CO",
       "zip": "80202"
   }`
   
   
   
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] mattjackson220 closed issue #6175: POST request to /api/4.0/phys_locations accepts mismatch values for regionName #5562

Posted by GitBox <gi...@apache.org>.
mattjackson220 closed issue #6175:
URL: https://github.com/apache/trafficcontrol/issues/6175


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] srijeet0406 commented on issue #6175: POST request to /api/4.0/phys_locations accepts mismatch values for regionName #5562

Posted by GitBox <gi...@apache.org>.
srijeet0406 commented on issue #6175:
URL: https://github.com/apache/trafficcontrol/issues/6175#issuecomment-933779140


   I can take this.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 commented on issue #6175: POST request to /api/4.0/phys_locations accepts mismatch values for regionName #5562

Posted by GitBox <gi...@apache.org>.
ocket8888 commented on issue #6175:
URL: https://github.com/apache/trafficcontrol/issues/6175#issuecomment-915361546


   >  ... or `region` could be dynamically named based on ID.
   
   So instead of just ignoring the name it would correct it in the response to be the Region identified by `regionId`? IMO, it would be best to just do away with the ID in the requests and responses and just only use the name. Of course, that'll be a breaking API change whereas just correcting it wouldn't be.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org