Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve decryption failure message #24573

Merged
merged 3 commits into from May 7, 2023
Merged

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented May 7, 2023

Help some users like #16832 #1851

There are many users reporting similar problem: if the SECRET_KEY mismatches, some operations (like 2FA login) only reports unclear 500 error and unclear "base64 decode error" log (some maintainers ever spent a lot of time on debugging such problem)

The SECRET_KEY was not well-designed and it is also a kind of technical debt. Since it couldn't be fixed easily, it's good to add clearer error messages, then at least users could know what the real problem is.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 7, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 7, 2023
@wxiaoguang wxiaoguang added the outdated/backport/v1.19 This PR should be backported to Gitea 1.19 label May 7, 2023
modules/secret/secret.go Outdated Show resolved Hide resolved
modules/secret/secret.go Outdated Show resolved Hide resolved
modules/secret/secret.go Outdated Show resolved Hide resolved
modules/secret/secret.go Outdated Show resolved Hide resolved
modules/secret/secret_test.go Outdated Show resolved Hide resolved
wxiaoguang and others added 2 commits May 7, 2023 18:14
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 7, 2023
@delvh delvh added the type/docs This PR mainly updates/creates documentation label May 7, 2023
@delvh delvh added this to the 1.20.0 milestone May 7, 2023
@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 May 7, 2023
@lunny lunny merged commit 0bb5288 into go-gitea:main May 7, 2023
15 checks passed
@GiteaBot
Copy link
Contributor

GiteaBot commented May 7, 2023

I was unable to create a backport for 1.19. @wxiaoguang, please send one manually. 🍵

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label May 7, 2023
@wxiaoguang wxiaoguang deleted the improve-secret-err branch May 7, 2023 12:32
wxiaoguang added a commit to wxiaoguang/gitea that referenced this pull request May 7, 2023
@wxiaoguang wxiaoguang added the backport/done All backports for this PR have been created label May 7, 2023
lunny pushed a commit that referenced this pull request May 7, 2023
Backport #24573

Help some users like #16832 #1851

There are many users reporting similar problem: if the SECRET_KEY
mismatches, some operations (like 2FA login) only reports unclear 500
error and unclear "base64 decode error" log (some maintainers ever spent
a lot of time on debugging such problem)

The SECRET_KEY was not well-designed and it is also a kind of technical
debt. Since it couldn't be fixed easily, it's good to add clearer error
messages, then at least users could know what the real problem is.
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 8, 2023
* upstream/main:
  Fix broken link in tests/e2e/README (go-gitea#24576)
  [skip ci] Updated licenses and gitignores
  Add goto issue id function (go-gitea#24479)
  Improve decryption failure message (go-gitea#24573)
  Simplify template helper functions (go-gitea#24570)
  Makefile: Use portable !, not GNUish -not, with find(1). (go-gitea#24565)
  Add org visibility label to non-organization's dashboard (go-gitea#24558)
  Sort users and orgs on explore by recency by default (go-gitea#24279)
  Change `add_on` translation to `added_on` and include placeholder for the date (go-gitea#24562)
  Change `valid_until` translation to `valid_until_date` and include placeholder for the date (go-gitea#24563)
  Fix docs failing the build on `main` (go-gitea#24561)
  Improve wiki user title test (go-gitea#24559)
  Fix incorrect user visibility (go-gitea#24557)
  Change `join_on` translation to `joined_on` and include placeholder for the date (go-gitea#24550)
  Require at least one unit to be enabled (go-gitea#24189)
  Fix broken `README` link (go-gitea#24546)
  Check latest version on CI (go-gitea#24556)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants