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

Prevent use of double sub-path and incorrect asset path in manifest #14827

Merged

Conversation

zeripath
Copy link
Contributor

MakeAbsoluteAssetURL should just url join the static url prefix on to appurl
if it is not an absolute path - this is because StaticURLPrefix is an absolute
prefix not a relative prefix to the app sub url.

Fix #14422
Close #14427

Signed-off-by: Andrew Thornton art27@cantab.net

MakeAbsoluteAssetURL should just url join the static url prefix on to appurl
if it is not an absolute path - this is because StaticURLPrefix is an absolute
prefix not a relative prefix to the app sub url.

Fix go-gitea#14422

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.14.0 milestone Feb 27, 2021
@codecov-io
Copy link

codecov-io commented Feb 27, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@2e8ce1e). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #14827   +/-   ##
=========================================
  Coverage          ?   42.23%           
=========================================
  Files             ?      771           
  Lines             ?    82181           
  Branches          ?        0           
=========================================
  Hits              ?    34711           
  Misses            ?    41821           
  Partials          ?     5649           
Impacted Files Coverage Δ
modules/setting/setting.go 48.93% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e8ce1e...b47a1b9. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 27, 2021
@6543
Copy link
Member

6543 commented Feb 28, 2021

@uli-heller can you also verify this patch fix it for you too?

@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 Feb 28, 2021
@uli-heller
Copy link
Contributor

I'm about to verify the patch against master, hope this is fine:

$ git log --oneline
f8efcf6e6 (HEAD -> test-pull-request-14827, origin/test-pull-request-14827) Merge branch 'master' into fix-14422-make-absolute-asset-url-fixes
4e7e3bd4b (upstream/master, upstream/HEAD, upstream-master) [skip ci] Updated licenses and gitignores
5c4342b6f Prevent use of double sub-path and incorrect asset path in manifest
3d8b5ad5f Fix a couple of CommentAsPatch issues.  (#14804)
...

@uli-heller
Copy link
Contributor

image

To me, all fine

  • commit id shown within footer
  • url contains a context (/gitea)
  • when querying the logo.png, the context shows up within the url just once

@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 Feb 28, 2021
@zeripath zeripath merged commit cf29cb3 into go-gitea:master Feb 28, 2021
@zeripath zeripath deleted the fix-14422-make-absolute-asset-url-fixes branch February 28, 2021 12:29
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
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/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chrome tries to load .../gitea/gitea/img/logo.png, Firefox loads .../gitea/img/logo.png
6 participants