In our project we use the encode credentials method to encode basic auth credentials, that we than send using HTTP. While testing we found out, that the following method:
Will produce an \n inside of the encoded string because of the length and the used encoding method.
def encode_credentials(user_name, password)
The method #encode64s should be used instead.
We tested and explored the bug with the password string: "tÍ¡ÊƒdÍ¡Ê’tÍ¡ÊƒdÍ¡Ê’tÍ¡ÊƒdÍ¡Ê"
Eliminate newlines in basic auth. fixes #2882