I own the Carburetor project which is hosted on Framagit .
Since the home page is https://tractor.frama.io/carburetor , the APPID is io.frama.tractor.carburetor
.
When I try to verify the app on Flathub, it asks me to put the .well-known
file in https://frama.io
, while it should be https://tractor.frama.io
.
Ain’t there any workarounds?
hub
December 31, 2023, 3:40am
3
IMHO this is a bug. It should ask it at the top level of tractor.frama.io
.
It is a bug, indeed.
My guess is that _get_domain_name()
in verification.py
could use a good revamping, or another workaround:
# [2]: https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus
if name.startswith("_"):
# Remove the underscore, which is escaping a digit
name = name[1:]
# All other underscores are replacements for hyphens
name = name.replace("_", "-")
return name
def _get_domain_name(app_id: str) -> str | None:
if _matches_prefixes(app_id, "com.github", "com.gitlab"):
# These app IDs are common, and we don't want to confuse people by saying they can put a file on GitHub/GitLab's
# main website.
return None
elif _matches_prefixes(app_id, "io.github", "io.gitlab", "page.codeberg"):
# You can, however, verify by putting a file on your *.github.io or *.gitlab.io site
[tld, domain, username] = app_id.split(".")[0:3]
username = _demangle_name(username)
return f"{username}.{domain}.{tld}".lower()
elif _matches_prefixes(app_id, "io.sourceforge", "net.sourceforge"):
I sent a pull request there to fix this temporarily, but it should let people to choose the base URL from their app id if there’s more than two dots in it.
See Add domain name tests and allow subdomains by razzeee · Pull Request #2301 · flathub-infra/website · GitHub but there are additional security concerns, as I heard, that organizations like to misconfigure their dns.