summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-21 10:34:41 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-21 10:34:41 +0000
commit72f50fcb2c94d0ca6e9bdc402207af43f0f8472c (patch)
tree15339c3f487df58a5099ebdd368c378773782447
parent6a10e2e52a1ae614fe467245e5e5946e67e0905d (diff)
parentfe1553e943fd1c0734506d888560fc97bf22aafc (diff)
downloadgitlab-ce-72f50fcb2c94d0ca6e9bdc402207af43f0f8472c.tar.gz
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
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 19104336598..7e3a7262afc 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -471,7 +471,7 @@ class User < ActiveRecord::Base
def avatar_url(size = nil)
if avatar.present?
- URI::join(gitlab_config.url, avatar.url).to_s
+ [gitlab_config.url, avatar.url].join("/")
else
GravatarService.new.execute(email, size)
end