Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
42725ea9
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,发现更多精彩内容 >>
提交
42725ea9
编写于
3月 07, 2018
作者:
R
Robert Speicher
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'dev/master'
上级
d9ca7655
2fcf779c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
40 addition
and
1 deletion
+40
-1
CHANGELOG.md
CHANGELOG.md
+21
-0
GITLAB_PAGES_VERSION
GITLAB_PAGES_VERSION
+1
-1
app/controllers/concerns/authenticates_with_two_factor.rb
app/controllers/concerns/authenticates_with_two_factor.rb
+1
-0
changelogs/unreleased/sh-fix-otp-backup-code-invalidation.yml
...gelogs/unreleased/sh-fix-otp-backup-code-invalidation.yml
+5
-0
spec/features/users/login_spec.rb
spec/features/users/login_spec.rb
+12
-0
未找到文件。
CHANGELOG.md
浏览文件 @
42725ea9
...
...
@@ -2,6 +2,13 @@
documentation
](
doc/development/changelog.md
)
for instructions on adding your own
entry.
## 10.5.3 (2018-03-01)
### Security (1 change)
-
Ensure that OTP backup codes are always invalidated.
## 10.5.2 (2018-02-25)
### Fixed (7 changes)
...
...
@@ -219,6 +226,13 @@ entry.
-
Adds empty state illustration for pending job.
## 10.4.5 (2018-03-01)
### Security (1 change)
-
Ensure that OTP backup codes are always invalidated.
## 10.4.4 (2018-02-16)
### Security (1 change)
...
...
@@ -443,6 +457,13 @@ entry.
-
Use a background migration for issues.closed_at.
## 10.3.8 (2018-03-01)
### Security (1 change)
-
Ensure that OTP backup codes are always invalidated.
## 10.3.7 (2018-02-05)
### Security (4 changes)
...
...
GITLAB_PAGES_VERSION
浏览文件 @
42725ea9
0.6.
0
0.6.
1
app/controllers/concerns/authenticates_with_two_factor.rb
浏览文件 @
42725ea9
...
...
@@ -56,6 +56,7 @@ module AuthenticatesWithTwoFactor
session
.
delete
(
:otp_user_id
)
remember_me
(
user
)
if
user_params
[
:remember_me
]
==
'1'
user
.
save!
sign_in
(
user
)
else
user
.
increment_failed_attempts!
...
...
changelogs/unreleased/sh-fix-otp-backup-code-invalidation.yml
0 → 100644
浏览文件 @
42725ea9
---
title
:
Ensure that OTP backup codes are always invalidated
merge_request
:
author
:
type
:
security
spec/features/users/login_spec.rb
浏览文件 @
42725ea9
...
...
@@ -145,6 +145,18 @@ feature 'Login' do
expect
{
enter_code
(
codes
.
sample
)
}
.
to
change
{
user
.
reload
.
otp_backup_codes
.
size
}.
by
(
-
1
)
end
it
'invalidates backup codes twice in a row'
do
random_code
=
codes
.
delete
(
codes
.
sample
)
expect
{
enter_code
(
random_code
)
}
.
to
change
{
user
.
reload
.
otp_backup_codes
.
size
}.
by
(
-
1
)
gitlab_sign_out
gitlab_sign_in
(
user
)
expect
{
enter_code
(
codes
.
sample
)
}
.
to
change
{
user
.
reload
.
otp_backup_codes
.
size
}.
by
(
-
1
)
end
end
context
'with invalid code'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录