Skip to content

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented Apr 29, 2022

Backport #19310.

The DefaultUserIsRestricted system configuration options is not always enforced when creating a new user.

This PR configures the system defaults in user_model.CreateUser, and also enhances the CreateUserOverwriteOptions to allow overwriting the system defaults when needed.

I think this can be considered as a security bugfix that warrants a backport because as the current behavior does not match the documentation in app.example.ini:

;; Every new user will have restricted permissions depending on this setting
;DEFAULT_USER_IS_RESTRICTED = false

@jpraet jpraet added this to the 1.16.7 milestone Apr 29, 2022
@jpraet jpraet added type/bug topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! labels Apr 29, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 30, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 30, 2022
@6543 6543 merged commit 7c0bf06 into go-gitea:release/v1.16 Apr 30, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants