Skip to content

Bugfix/return client errors#693

Open
sashawood wants to merge 2 commits intoarskom:masterfrom
sashawood:bugfix/return-client-errors
Open

Bugfix/return client errors#693
sashawood wants to merge 2 commits intoarskom:masterfrom
sashawood:bugfix/return-client-errors

Conversation

@sashawood
Copy link
Copy Markdown

Handle 2 cases where bad client data cause a 500 Internal Server Error, rather than the nicer soap11env:Client.XMLSyntaxError.

Case 1: Client does not send body in its request. This causes an empty generator to be passed to _parse_xml_string, which causes an unhandled StopIteration exception.

Case 2: Client sends badly encoded data in its request. This causes a badly encoded byte string to be passed to _parse_xml_string, which causes a UnicodeDecodeError when we try to decode it.

@arskom-jenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

@plq
Copy link
Copy Markdown
Member

plq commented Jan 10, 2023

hey, thanks for the patch. i'm sorry these seem to have totally evaded my attention, looking into these right now

@plq plq added the Defect label Jan 10, 2023
@plq plq force-pushed the bugfix/return-client-errors branch from 9d419c3 to 99489c9 Compare January 10, 2023 14:22
@plq plq force-pushed the bugfix/return-client-errors branch from 99489c9 to ca3f836 Compare January 11, 2023 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants