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 2022/12/13 21:22:00 UTC

[GitHub] [trafficcontrol] ocket8888 opened a new issue, #7249: Setting your own email address to one that's used by another user causes Internal Server Error

ocket8888 opened a new issue, #7249:
URL: https://github.com/apache/trafficcontrol/issues/7249

   ## This Bug Report affects these Traffic Control components:
   - Traffic Ops
   
   ## Current behavior:
   When a user attempts to update his or her email address to one that's already in use by another user, Traffic Ops will respond with a `500 Internal Server Error` response.
   
   ## Expected behavior:
   The error can be corrected by modifying the request, so the response code should be in the 400s (I suggest 409 or exactly 400) and should be accompanied by an error-level Alert that describes the problem.
   
   ## Steps to reproduce:
   1. Create a user
   2. Attempt to set its email address to that of another user via a PUT request to `/user/current`.
   


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

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


[GitHub] [trafficcontrol] ocket8888 commented on issue #7249: Setting your own email address to one that's used by another user causes Internal Server Error

Posted by "ocket8888 (via GitHub)" <gi...@apache.org>.
ocket8888 commented on issue #7249:
URL: https://github.com/apache/trafficcontrol/issues/7249#issuecomment-1462271981

   Well you can certainly open a PR


-- 
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 #7249: Setting your own email address to one that's used by another user causes Internal Server Error

Posted by "ocket8888 (via GitHub)" <gi...@apache.org>.
ocket8888 commented on issue #7249:
URL: https://github.com/apache/trafficcontrol/issues/7249#issuecomment-1460770403

   The issue doesn't manifest when creating a new user, it only surfaces when an existing user tries to edit itself through a `PUT` request to `user/current`.


-- 
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 closed issue #7249: Setting your own email address to one that's used by another user causes Internal Server Error

Posted by "ocket8888 (via GitHub)" <gi...@apache.org>.
ocket8888 closed issue #7249: Setting your own email address to one that's used by another user causes Internal Server Error
URL: https://github.com/apache/trafficcontrol/issues/7249


-- 
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] tinfoil-knight commented on issue #7249: Setting your own email address to one that's used by another user causes Internal Server Error

Posted by "tinfoil-knight (via GitHub)" <gi...@apache.org>.
tinfoil-knight commented on issue #7249:
URL: https://github.com/apache/trafficcontrol/issues/7249#issuecomment-1460709509

   @ocket8888 Was inspecting this today. This issue no longer exists & can be closed.
   
   This is the response with HTTP Status 400 on attempting to create a user with an email that's already used through the `POST /users` API.
   
   ```
   {
       "alerts": [
           {
               "text": "tm_user email 'mwazowski@minc.biz' already exists.",
               "level": "error"
           }
       ]
   }
   ```


-- 
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] tinfoil-knight commented on issue #7249: Setting your own email address to one that's used by another user causes Internal Server Error

Posted by "tinfoil-knight (via GitHub)" <gi...@apache.org>.
tinfoil-knight commented on issue #7249:
URL: https://github.com/apache/trafficcontrol/issues/7249#issuecomment-1462165082

   My bad. I was able to reproduce the issue. We're not checking if the email is duplicate in `validateV4` (used by the `user.ReplaceCurrentV4` handler) which is causing the issue. 
   
   https://github.com/apache/trafficcontrol/blob/573f21d1a8673ead63f4ee0c30bb0f17b7ff9835/traffic_ops/traffic_ops_golang/user/current.go#L490-L497
   
   @ocket8888 Can I push a fix for 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