Currently @require resources are fetched from the swift side and will get resources loaded from http, instead https is required.
The following resource can no be added to a userscript:
http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
The following resource CAN be added to a userscript:
https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
This has caused issues for some users who are using userscripts that load resources from http. There's an Apple dev forum post here where an Apple employee describes the perfect scenario for arbitrarily allowing user defined http resources, which happens to fit well into this context.
For example, imagine you’re building a tool where the user can enter an arbitrary URL and you fetch that URL and display the returned headers. The user might enter any sort of URL, including an http URL, or one to a server whose TLS setup is broken, and you still need to work with it. That’s a perfect use case for NSAllowsArbitraryLoads.
Assuming, NSAllowsArbitraryLoads is still the "fix", it can be easily implemented. I'm ambivalent on this change. It rarely would affect me because I write most of my own userscripts and wouldn't want to use userscripts loading content from http. However, I can't expect every user of this app/extension to be as discerning. Related to this, GM.xmlHttpRequest and the GM_ counterpart both allow fetching from http. If http is disallowed for @require it should also probably be disallowed for those methods and vice versa.
If anyone has opinions on this, please do chime in.
Currently
@requireresources are fetched from the swift side and will get resources loaded fromhttp, insteadhttpsis required.The following resource can no be added to a userscript:
http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.jsThe following resource CAN be added to a userscript:
https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.jsThis has caused issues for some users who are using userscripts that load resources from
http. There's an Apple dev forum post here where an Apple employee describes the perfect scenario for arbitrarily allowing user definedhttpresources, which happens to fit well into this context.Assuming,
NSAllowsArbitraryLoadsis still the "fix", it can be easily implemented. I'm ambivalent on this change. It rarely would affect me because I write most of my own userscripts and wouldn't want to use userscripts loading content fromhttp. However, I can't expect every user of this app/extension to be as discerning. Related to this,GM.xmlHttpRequestand theGM_counterpart both allow fetching fromhttp. Ifhttpis disallowed for@requireit should also probably be disallowed for those methods and vice versa.If anyone has opinions on this, please do chime in.