Commit 72f50fcb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix/avatar_relative_url' into 'master'

Fix Avatar and Relative URL

Fixes https://github.com/gitlabhq/gitlabhq/issues/7270

Instead of `URI::join` use a simple join with a slash. This is how all other places in GitLab join URLs and it doesn't muck with the relative path.

See merge request !144
parents 6a10e2e5 fe1553e9
...@@ -471,7 +471,7 @@ class User < ActiveRecord::Base ...@@ -471,7 +471,7 @@ class User < ActiveRecord::Base
def avatar_url(size = nil) def avatar_url(size = nil)
if avatar.present? if avatar.present?
URI::join(gitlab_config.url, avatar.url).to_s [gitlab_config.url, avatar.url].join("/")
else else
GravatarService.new.execute(email, size) GravatarService.new.execute(email, size)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment