Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
81e899ea
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
81e899ea
编写于
6月 01, 2018
作者:
S
Stan Hu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'sh-bump-ruby-2.4' into 'master'
Upgrade to Ruby 2.4.4 See merge request gitlab-org/gitlab-ce!19055
上级
160cc6cd
b5c70632
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
27 addition
and
18 deletion
+27
-18
.gitlab-ci.yml
.gitlab-ci.yml
+3
-3
.ruby-version
.ruby-version
+1
-1
app/models/clusters/platforms/kubernetes.rb
app/models/clusters/platforms/kubernetes.rb
+2
-2
app/models/clusters/providers/gcp.rb
app/models/clusters/providers/gcp.rb
+1
-1
app/models/concerns/has_variable.rb
app/models/concerns/has_variable.rb
+1
-1
app/models/pages_domain.rb
app/models/pages_domain.rb
+1
-1
app/models/project_import_data.rb
app/models/project_import_data.rb
+1
-1
app/models/remote_mirror.rb
app/models/remote_mirror.rb
+1
-1
config/initializers/01_secret_token.rb
config/initializers/01_secret_token.rb
+3
-0
config/settings.rb
config/settings.rb
+4
-0
db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
...e/20160302152808_remove_wrong_import_url_from_projects.rb
+1
-1
db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
...grate_kubernetes_service_to_new_clusters_architectures.rb
+1
-1
doc/install/installation.md
doc/install/installation.md
+3
-3
spec/initializers/secret_token_spec.rb
spec/initializers/secret_token_spec.rb
+1
-1
spec/models/concerns/has_variable_spec.rb
spec/models/concerns/has_variable_spec.rb
+3
-1
未找到文件。
.gitlab-ci.yml
浏览文件 @
81e899ea
image
:
"
dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.
3.7
-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6"
image
:
"
dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.
4.4
-golang-1.9-git-2.17-chrome-65.0-node-8.x-yarn-1.2-postgresql-9.6"
.dedicated-runner
:
&dedicated-runner
retry
:
1
...
...
@@ -6,7 +6,7 @@ image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.7-golang-1.9-git
-
gitlab-org
.default-cache
:
&default-cache
key
:
"
ruby-2.
3.7
-debian-stretch-with-yarn"
key
:
"
ruby-2.
4.4
-debian-stretch-with-yarn"
paths
:
-
vendor/ruby
-
.yarn-cache/
...
...
@@ -550,7 +550,7 @@ static-analysis:
script
:
-
scripts/static-analysis
cache
:
key
:
"
ruby-2.
3.7
-debian-stretch-with-yarn-and-rubocop"
key
:
"
ruby-2.
4.4
-debian-stretch-with-yarn-and-rubocop"
paths
:
-
vendor/ruby
-
.yarn-cache/
...
...
.ruby-version
浏览文件 @
81e899ea
2.
3.7
2.
4.4
app/models/clusters/platforms/kubernetes.rb
浏览文件 @
81e899ea
...
...
@@ -11,12 +11,12 @@ module Clusters
attr_encrypted
:password
,
mode: :per_attribute_iv
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
algorithm:
'aes-256-cbc'
attr_encrypted
:token
,
mode: :per_attribute_iv
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
algorithm:
'aes-256-cbc'
before_validation
:enforce_namespace_to_lower_case
...
...
app/models/clusters/providers/gcp.rb
浏览文件 @
81e899ea
...
...
@@ -11,7 +11,7 @@ module Clusters
attr_encrypted
:access_token
,
mode: :per_attribute_iv
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
algorithm:
'aes-256-cbc'
validates
:gcp_project_id
,
...
...
app/models/concerns/has_variable.rb
浏览文件 @
81e899ea
...
...
@@ -13,7 +13,7 @@ module HasVariable
attr_encrypted
:value
,
mode: :per_attribute_iv_and_salt
,
insecure_mode:
true
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
algorithm:
'aes-256-cbc'
def
key
=
(
new_key
)
...
...
app/models/pages_domain.rb
浏览文件 @
81e899ea
...
...
@@ -19,7 +19,7 @@ class PagesDomain < ActiveRecord::Base
attr_encrypted
:key
,
mode: :per_attribute_iv_and_salt
,
insecure_mode:
true
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
algorithm:
'aes-256-cbc'
after_initialize
:set_verification_code
...
...
app/models/project_import_data.rb
浏览文件 @
81e899ea
...
...
@@ -3,7 +3,7 @@ require 'carrierwave/orm/activerecord'
class
ProjectImportData
<
ActiveRecord
::
Base
belongs_to
:project
,
inverse_of: :import_data
attr_encrypted
:credentials
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
marshal:
true
,
encode:
true
,
mode: :per_attribute_iv_and_salt
,
...
...
app/models/remote_mirror.rb
浏览文件 @
81e899ea
...
...
@@ -5,7 +5,7 @@ class RemoteMirror < ActiveRecord::Base
UNPROTECTED_BACKOFF_DELAY
=
5
.
minutes
attr_encrypted
:credentials
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
marshal:
true
,
encode:
true
,
mode: :per_attribute_iv_and_salt
,
...
...
config/initializers/secret_token.rb
→
config/initializers/
01_
secret_token.rb
浏览文件 @
81e899ea
# This file needs to be loaded BEFORE any initializers that attempt to
# prepend modules that require access to secrets (e.g. EE's 0_as_concern.rb).
#
# Be sure to restart your server when you modify this file.
require
'securerandom'
...
...
config/settings.rb
浏览文件 @
81e899ea
...
...
@@ -85,6 +85,10 @@ class Settings < Settingslogic
File
.
expand_path
(
path
,
Rails
.
root
)
end
def
attr_encrypted_db_key_base
Gitlab
::
Application
.
secrets
.
db_key_base
[
0
..
31
]
end
private
def
base_url
(
config
)
...
...
db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb
浏览文件 @
81e899ea
...
...
@@ -8,7 +8,7 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration
extend
AttrEncrypted
attr_accessor
:credentials
attr_encrypted
:credentials
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
marshal:
true
,
encode:
true
,
:mode
=>
:per_attribute_iv_and_salt
,
...
...
db/post_migrate/20171124104327_migrate_kubernetes_service_to_new_clusters_architectures.rb
浏览文件 @
81e899ea
...
...
@@ -48,7 +48,7 @@ class MigrateKubernetesServiceToNewClustersArchitectures < ActiveRecord::Migrati
attr_encrypted
:token
,
mode: :per_attribute_iv
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
key:
Settings
.
attr_encrypted_
db_key_base
,
algorithm:
'aes-256-cbc'
end
...
...
doc/install/installation.md
浏览文件 @
81e899ea
...
...
@@ -133,9 +133,9 @@ Remove the old Ruby 1.8 if present:
Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.
3/ruby-2.3.7
.tar.gz
echo '
540996fec64984ab6099e34d2f5820b14904f15a ruby-2.3.7.tar.gz' | shasum -c - && tar xzf ruby-2.3.7
.tar.gz
cd ruby-2.
3.7
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.
4/ruby-2.4.4
.tar.gz
echo '
ec82b0d53bd0adad9b19e6b45e44d54e9ec3f10c ruby-2.4.4.tar.gz' | shasum -c - && tar xzf ruby-2.4.4
.tar.gz
cd ruby-2.
4.4
./configure --disable-install-rdoc
make
...
...
spec/initializers/secret_token_spec.rb
浏览文件 @
81e899ea
require
'spec_helper'
require_relative
'../../config/initializers/secret_token'
require_relative
'../../config/initializers/
01_
secret_token'
describe
'create_tokens'
do
include
StubENV
...
...
spec/models/concerns/has_variable_spec.rb
浏览文件 @
81e899ea
...
...
@@ -45,8 +45,10 @@ describe HasVariable do
end
it
'fails to decrypt if iv is incorrect'
do
subject
.
encrypted_value_iv
=
SecureRandom
.
hex
# attr_encrypted expects the IV to be 16 bytes and base64-encoded
subject
.
encrypted_value_iv
=
[
SecureRandom
.
hex
(
8
)].
pack
(
'm'
)
subject
.
instance_variable_set
(
:@value
,
nil
)
expect
{
subject
.
value
}
.
to
raise_error
(
OpenSSL
::
Cipher
::
CipherError
,
'bad decrypt'
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录