Only load emoji spritesheet when necessary
On a normal issue where the only award emoji displayed by default are
the thumbs-up and thumbs-down emoji, this decreases the page load by
670KB or 250KB depending on pixel density.
Resolves#14334.
See merge request !3449
The emoji_icon helper used to display the award emoji in Issue and
Merge Request views. By default the spritesheet is used, but passing
`sprite: false` to the `emoji_icon` helper makes the emoji render as
separate images.
For award emoji displayed by default (e.g. thumbs-up, thumbs-down, and
any that have been awarded to the issue/MR) the independent images are
used. Only when the full emoji menu is opened does the full spritesheet
load.
On a normal issue this change decreases the page load by 670KB or 250KB
depending on pixel density.
Resolves#14334.
* '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
Do not add location badge when creating a group or project
Closes#14952


See merge request !3555
Wrap code blocks to next line
Closes#14866

See merge request !3573
Search Design fixes
Closes#14800
- Use colors according to design
- Fix width of search input


See merge request !3475
Fixed delete comment button color

See merge request !3562
Update shades of red
Closes#14342
Before:

Fixed:

See merge request !3549