Commit 8c997f31 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #1632 from NARKOZ/patch-0

performance and security fixes
parents 74213534 d2ea858f
...@@ -8,7 +8,7 @@ $style_color: #474d57; ...@@ -8,7 +8,7 @@ $style_color: #474d57;
$hover: #D9EDF7; $hover: #D9EDF7;
/** GitLab Fonts **/ /** GitLab Fonts **/
@font-face { font-family: Korolev; src: url('korolev-medium-compressed.otf'); } @font-face { font-family: Korolev; src: font-url('korolev-medium-compressed.otf'); }
/** MIXINS **/ /** MIXINS **/
@mixin shade { @mixin shade {
......
...@@ -50,8 +50,5 @@ module Gitlab ...@@ -50,8 +50,5 @@ module Gitlab
# Version of your assets, change this if you want to expire all your assets # Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0' config.assets.version = '1.0'
# Add fonts
config.assets.paths << "#{Rails.root}/app/assets/fonts"
end end
end end
...@@ -184,7 +184,8 @@ Gitlab::Application.routes.draw do ...@@ -184,7 +184,8 @@ Gitlab::Application.routes.draw do
resources :blame, only: [:show], constraints: {id: /.+/} resources :blame, only: [:show], constraints: {id: /.+/}
resources :blob, only: [:show], constraints: {id: /.+/} resources :blob, only: [:show], constraints: {id: /.+/}
resources :tree, only: [:show], constraints: {id: /.+/} resources :tree, only: [:show], constraints: {id: /.+/}
match "/compare/:from...:to" => "compare#show", as: "compare", constraints: {from: /.+/, to: /.+/} match "/compare/:from...:to" => "compare#show", as: "compare",
:via => [:get, :post], constraints: {from: /.+/, to: /.+/}
resources :team, controller: 'team_members', only: [:index] resources :team, controller: 'team_members', only: [:index]
resources :team_members resources :team_members
......
module Emoji
path = "#{Rails.root}/vendor/assets/images/emoji"
NAMES = Dir["#{path}/*.png"].sort.map {|f| File.basename(f, '.png')}
end
...@@ -128,7 +128,7 @@ module Gitlab ...@@ -128,7 +128,7 @@ module Gitlab
# #
# Returns boolean # Returns boolean
def valid_emoji?(emoji) def valid_emoji?(emoji)
File.exists?(Rails.root.join('app', 'assets', 'images', 'emoji', "#{emoji}.png")) Emoji::NAMES.include? emoji
end end
# Private: Dispatches to a dedicated processing method based on reference # Private: Dispatches to a dedicated processing method based on reference
......
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