mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
curl tests: Skip assets hosted on a third party site ... though display a warning about it
This commit is contained in:
parent
aa2bd2d8b8
commit
01377f761a
1 changed files with 9 additions and 2 deletions
|
@ -210,8 +210,15 @@ def test(
|
||||||
"\033[1m\033[93mWARN\033[0m auto_test_assets set to true, but no js/css asset found in this page"
|
"\033[1m\033[93mWARN\033[0m auto_test_assets set to true, but no js/css asset found in this page"
|
||||||
)
|
)
|
||||||
for asset in assets_to_check:
|
for asset in assets_to_check:
|
||||||
if asset.startswith(f"https://{domain}"):
|
# FIXME : this is pretty clumsy, should probably be replaced with a proper URL parsing to serparate domains etc...
|
||||||
asset = asset.replace(f"https://{domain}", "")
|
if asset.startswith(f"https://"):
|
||||||
|
if asset.startswith(f"https://{domain}"):
|
||||||
|
asset = asset.replace(f"https://{domain}", "")
|
||||||
|
elif:
|
||||||
|
print(
|
||||||
|
"\033[1m\033[93mWARN\033[0m Found asset '{asset}' which seems to be hosted on a third party, external website ... Not super great for privacy etc... ?"
|
||||||
|
)
|
||||||
|
continue
|
||||||
elif asset.startswith(f"{domain}/"):
|
elif asset.startswith(f"{domain}/"):
|
||||||
asset = asset.replace(f"{domain}/", "")
|
asset = asset.replace(f"{domain}/", "")
|
||||||
if not asset.startswith("/"):
|
if not asset.startswith("/"):
|
||||||
|
|
Loading…
Add table
Reference in a new issue