Skip to content

Properly encode the Redis password component in the URL

Stan Hu requested to merge sh-encode-redis-password-in-url into master

Passing in non-alphanumeric passwords, such as #, as a password would fail to parse properly in the GitLab CE Redis wrapper because the password component was not valid.

This merge request changes two things:

  1. Change the custom redis:// URI handler to enforce that the Redis password conforms to RFC 2396. This is done in the standard HTTP URI handler already (https://github.com/ruby/ruby/blob/v2_5_3/lib/uri/generic.rb#L431-L433), but it was not done in the Redis URI implementation.

  2. Encodes the password component when building the Redis URL.

Closes #3288 (closed)

Edited by GitLab Release Tools Bot

Merge request reports

Loading