Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reject invalid role:target early in sender rpc handler #128

Closed
houqp opened this issue Apr 19, 2017 · 2 comments
Closed

reject invalid role:target early in sender rpc handler #128

houqp opened this issue Apr 19, 2017 · 2 comments
Assignees

Comments

@houqp
Copy link
Contributor

houqp commented Apr 19, 2017

The current behavior is a little bit confusing because it returns 200 to the client, the message won't be delivered later in the code path if role:target is invalid.

@jrgp jrgp self-assigned this Apr 19, 2017
@jrgp
Copy link
Member

jrgp commented Apr 19, 2017

I can't reproduce this. When I try to send to an invalid user using iris.client, I get this:

ValueError: Error response from server, 400: {
    "title": "Request rejected by sender",
    "description": "INVALID role:target"
}

However, I did add tests and more logging to confirm this behavior, and added a few more checks that reject requests that are missing both body and template (which results in not being able to send a message anyway):

#130

@houqp
Copy link
Contributor Author

houqp commented Apr 19, 2017

Ha, you are right, I missed that extra expand check ;)

@jrgp jrgp closed this as completed Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants