-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
App Name Validation Can Allow Names that Produce an Invalid pyproject.toml
#1011
Comments
|
hmmm....this sent me down another rabbit hole. I eventually found PEP-3131 and its subsequent docs that outlines the supported non-ASCII characters allowed in "names" in Python. Therefore, However, these rules do not apply for all the tooling used throughout Briefcase. Using this rule, I was only able to build a DMG package; all other workflows choked on the Therefore, we may ultimately be better served by revising the validation for this name to actually enforce only ASCII, underscore, or dash. |
I'm not sure a "hard ASCII" requirement is a valid option here. Briefcase aims to be able to wrap any Python module; if That said - there may be a need to provide an "ASCII-safe" mapping of app name, in the same way that we have |
I'm taking a jab at this during the sprint |
Fixed by #1223. |
Describe the bug
The App name validation can allow characters that are not valid as "bare keys" in the table names of the
pyproject.toml
file.For example, an app name of
this_is_a_dotless_lowercase_i_ı
produces table names like[tool.briefcase.app.this_is_a_dotless_lowercase_i_ı.macOS]
.TOML only allows ASCII in "bare key" names. But "quoted keys" can use a much broader set of characters. So,
[tool.briefcase.app."this_is_a_dotless_lowercase_i_ı".macOS]
becomes valid TOML.Given that Briefcase is simply using the regex from PEP-508 to validate names, the root of this may stem from much further upstream. Nonetheless, I think the underlying problem is they recommended using
re.IGNORECASE
; my guess is the underlying case folding is makingı
in to a "normal" lowercasei
and the the validation succeeds.Steps to reproduce
Use
ı
or alsoİ
in the App Name when runningbriefcase new
.Expected behavior
Such names should be rejected or the TOML should be created properly.
Screenshots
No response
Environment
0.3.12.dev251+g6d29ece1
Logs
briefcase.2022_12_16-15_17_55.dev.log
Additional context
No response
The text was updated successfully, but these errors were encountered: