You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there's a vulnerability in the code in that exceptions stringified to texts which end with a new line character mess up Apt's messaging system.
This happens because in APTMessage.encode() a new line is added to each header, even if that header already contained a trailing new line. Two successive new line characters seem to make Apt unable to decode the message properly, hence displaying incorrect error messages.
This may not be the case with the current code, but I bumped into this situation when throwing a Boto S3ResponseError, which happen to stringify like this:
Currently there's a vulnerability in the code in that exceptions stringified to texts which end with a new line character mess up Apt's messaging system.
This happens because in
APTMessage.encode()
a new line is added to each header, even if that header already contained a trailing new line. Two successive new line characters seem to make Apt unable to decode the message properly, hence displaying incorrect error messages.This may not be the case with the current code, but I bumped into this situation when throwing a Boto S3ResponseError, which happen to stringify like this:
In my case the body of the exception was empty, leading to a text ending with a new line.
So the following mind-blowing thing happened:
Case A
Code:
Outcome:
Case B
Code:
Outcome:
The text was updated successfully, but these errors were encountered: