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

Normalize AppURL according to RFC 3986 #21950

Merged
merged 3 commits into from
Nov 29, 2022

Conversation

SaswatPadhi
Copy link
Contributor

@SaswatPadhi SaswatPadhi commented Nov 27, 2022

Fixes #21865.

Scheme-based normalization (RFC 3986, section 6.2.3) was already implemented, but only for defaultAppURL.
This PR implements the same for AppURL.

Scheme-based normalization (RFC 3986, section 6.2.3) was already
implemented, but only for `defaultAppURL`.
This commit implements the same for `AppURL`.

Signed-off-by: Saswat Padhi <saswatpadhi@protonmail.com>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 28, 2022
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log.Fatal will make process exit, so the else and indentation block can be avoided (just put code on the top level). Otherwise LGTM.

@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 Nov 29, 2022
jolheiser and others added 2 commits November 28, 2022 19:51
Signed-off-by: Saswat Padhi <saswatpadhi@protonmail.com>
@SaswatPadhi
Copy link
Contributor Author

The log.Fatal will make process exit, so the else and indentation block can be avoided (just put code on the top level). Otherwise LGTM.

Thanks! I pushed another commit with the simplification you suggested.

@lunny lunny merged commit 715cf46 into go-gitea:main Nov 29, 2022
@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Nov 29, 2022
@SaswatPadhi SaswatPadhi deleted the normalize_AppURL branch November 29, 2022 07:47
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 3, 2022
* giteaofficial/main:
  docs: add `Edit this page` (go-gitea#21981)
  refactor some functions to support ctx as first parameter (go-gitea#21878)
  Remove deprecated packages & staticcheck fixes (go-gitea#22012)
  Add pnpm to packages/overview (go-gitea#22008)
  Update to Alpine 3.17 (go-gitea#21904)
  Update gitea-vet to check FSFE REUSE (go-gitea#22004)
  Multiple improvements for comment edit diff (go-gitea#21990)
  Remove session in api tests (go-gitea#21984)
  Remove duplicate "Actions" label in mobile view (go-gitea#21974)
  Fix generate index failure possibility on postgres (go-gitea#21998)
  Use path not filepath in template filenames (go-gitea#21993)
  Update chroma to v2.4.0 (go-gitea#22000)
  Util type to parse ref name (go-gitea#21969)
  Skip initing LFS storage if disabled (go-gitea#21996)
  Fix parallel creating commit status bug with tests (go-gitea#21911)
  Skip initing disabled storages (go-gitea#21985)
  Fix leaving organization bug on user settings -> orgs (go-gitea#21983)
  Fix typos (go-gitea#21979)
  Normalize `AppURL` according to RFC 3986 (go-gitea#21950)
@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. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore :443 in ROOT_URL when https:// is specified
6 participants