This changes the timestamp of metrics to be more accurate/unique by
using Time#to_f combined with a small random jitter value. This
combination hopefully reduces the amount of collisions, though there's
no way to fully prevent any from occurring.
Fixesgitlab-com/operations#175
Fix Incorrect Quote In Docker Executor Example
## What does this MR do?
The corrected line opened with a regular quote (') but closed with a back-tick (`)
I believe this is invalid bash syntax
## Are there points in the code the reviewer needs to double check?
Probably not
## Why was this MR needed?
Fixes error when example is copied and pasted
## What are the relevant issue numbers?
None
## Screenshots (if relevant)
None
See merge request !3604
* 'master' of dev.gitlab.org:gitlab/gitlabhq:
Make sessions controller specs more explicit
Fix 2FA authentication spoofing vulnerability
Add specs for sessions controller including 2FA
Fix 2FA authentication spoofing
## Summary
This is security fix for vulnerability described at
https://gitlab.com/gitlab-org/gitlab-ce/issues/14900.
Attacker was able to bypass password authentication of users that have 2FA enabled, and consequently sign is as a different user, without knowing his password, if he managed to guess 2FA One Time Password for that user.
It was also possible to enumerate users and check if they have 2FA enabled, because GitLab responded with different error for each case.
## Fix
This MR attempts to change default user search scope if `otp_user_id` session variable has been set. If it is present, it means that user has 2FA enabled, and has already been verified with login and password. In this case we should look for user with `otp_user_id` first, before picking it up by `login`.
Both, 2FA authentication spoofing and 2FA discovery have been covered by specs.
## Further work
Current 2FA code is a bit tricky, so it probably needs some refactoring.
See merge request !1947
Only update main language if it is not already set
Related to gitlab-org/gitlab-ce#14937 (but does not fully fix) This is a temporary fix so performance isn't affected so much.
cc @yorickpeterse @ayufan how does this look?
See merge request !3556
This commit attempts to change default user search scope if otp_user_id
session variable has been set. If it is present, it means that user has
2FA enabled, and has already been verified with login and password. In
this case we should look for user with otp_user_id first, before picking
it up by login.
Allow SAML to identify external users and set them as such
Related to #4009Fixes#14577
This allows SAML to retrieve group information form the `SAML Response`
and match that to a setting that will flag all matching users as external.
See merge request !3530
Wiki preview URL converting problem [via Markdown]
Current implementation when rendering the preview, thinks relative links are for project repository files.
We are creating a new preview route that will define correct context data to render for wikis instead.
Fixes#2380, #1184
See merge request !3461