Don't force the encoding of the OAuth provider in Gitlab::OAuth::AuthHash#provider
What does this MR do?
It remove the forced encoding of the provider name as they should always be in utf8 by default.
Are there points in the code the reviewer needs to double check?
Another solution is to .dup
the string before forcing the encoding.
Why was this MR needed?
Some providers freeze their name (e.g.
https://github.com/zquestz/omniauth-google-oauth2/blob/414c43ef3ffec37d473321f262e80f1e46dda89f/lib/omniauth/strategies/google_oauth2.rb#L1),
so trying to modify the string would fail with a can't modify frozen String
exception (see
#37845 (closed) (comment 40308148)).
In this case, we can just stop trying to force the encoding of the provider name as they should always be in utf8 by default.
Does this MR meet the acceptance criteria?
- [-] Changelog entry added, if necessary -> bug is in RC2 so it's doesn't warrant a changelog
-
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #37845 (closed)
Edited by Grzegorz Bizon