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

Unable to download URLs containing hash but without search #583

Closed
F9y4ng opened this issue Nov 17, 2023 · 8 comments · Fixed by #593
Closed

Unable to download URLs containing hash but without search #583

F9y4ng opened this issue Nov 17, 2023 · 8 comments · Fixed by #593
Labels
bug Something isn't working

Comments

@F9y4ng
Copy link

F9y4ng commented Nov 17, 2023

greasyfork.org updated the reference address format of @require, causing the SRI Hash used in the new address to not be downloaded correctly in v4.4.5, as follows:

// @require    https://update.greasyfork.org/scripts/460897/1277476/gbCookies.js#sha256-Sv+EuBerch8z/6LvAU0m/ufvjmqB1Q/kbQrX7zAvOPk=

But the original reference address as follows, can be parsed and downloaded correctly.

// @require    https://greasyfork.org/scripts/460897/code/gbCookies.js?version=1277476#sha256-Sv+EuBerch8z/6LvAU0m/ufvjmqB1Q/kbQrX7zAvOPk=

Please fix this bug, thanks.

@ACTCD ACTCD added the bug Something isn't working label Nov 17, 2023
@ACTCD
Copy link
Collaborator

ACTCD commented Nov 17, 2023

There is some confusion with the encoding of URL in Swift...

This issue will be attempted to be fixed in the next minor version.
So unlike a hot fix i.e. patch version, this will take some period.

As a interim solution, this will works:
You can add a ? just in front of the # to bypass the error for now.
(Please note this is still a legally correct URL)

It is worth noting that SRI Hash in URL is not implemented in this extension.

@ACTCD ACTCD changed the title [ERROR] v4.4.5 cannot correctly download the link address with SRI Hash in @require URL Unable to download URLs containing hash but without search Nov 17, 2023
@F9y4ng
Copy link
Author

F9y4ng commented Nov 18, 2023

According to the rules for external code allowed by greasyfork.org (https://greasyfork.org/en/help/external-scripts), external resources using non-specified CDNs may use scripts with sub-resource integrity hashes attached.

So it doesn't refer specifically to greasyfork's own script library resources, but there are other resource addresses that can fail to parse.so please fix this bug as soon as possible. Thanks.

@ACTCD
Copy link
Collaborator

ACTCD commented Nov 18, 2023

@F9y4ng In case you miss it, I'll reply to you again:

You can add a ? just in front of the # to bypass the error for now.

@F9y4ng
Copy link
Author

F9y4ng commented Nov 18, 2023

Hi @ACTCD, I already knew that adding URL Search Parameter can temporarily solve the problem before reporting this issue. Because this BUG will cause script errors or failure, I hope you can just raise the fix level, nothing more. Haha😀

@ACTCD
Copy link
Collaborator

ACTCD commented Nov 18, 2023

@F9y4ng I believe this is not a fatal error and not that common, so I will try to fix it in the next version.
Unless you want to contribute code directly. This may raise the fix level (still no guarantees).
Please understand that we only have a limited time to contribute to this open source project.

Anyway, thanks for reporting the issue. And thank you for your contributions to this project.

@F9y4ng
Copy link
Author

F9y4ng commented Nov 18, 2023

Please don't mind, I don't mean to rush you, update it according to your progress. I just think it may cause the script to fail completely, so I'd like to give a hint.

Thanks for your reply.

@ACTCD ACTCD linked a pull request Nov 30, 2023 that will close this issue
Repository owner deleted a comment from gith-cmd Dec 28, 2023
Repository owner deleted a comment from gith-cmd Dec 28, 2023
@ACTCD
Copy link
Collaborator

ACTCD commented Jan 29, 2024

The fix has been released with the new beta version. Sorry this took so long.

@F9y4ng
Copy link
Author

F9y4ng commented Jan 29, 2024

The fix has been released with the new beta version. Sorry this took so long.

That's ok, thanks.

@ACTCD ACTCD added this to Tasks Aug 19, 2024
@ACTCD ACTCD moved this to Beta in Tasks Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Beta
Development

Successfully merging a pull request may close this issue.

3 participants
@F9y4ng @ACTCD and others