-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Bookworm + Portal rework #1657
Bookworm + Portal rework #1657
Conversation
cd1bb22
to
bed9ecc
Compare
945ecdb
to
8ac48ee
Compare
allowed_cors_origins_file = "/etc/yunohost/.admin-api-allowed-cors-origins" | ||
|
||
if os.path.exists(allowed_cors_origins_file): | ||
allowed_cors_origins = open(allowed_cors_origins_file).read().strip().split(",") |
Check warning
Code scanning / CodeQL
File is not always closed Warning
allowed_cors_origins_file = "/etc/yunohost/.portal-api-allowed-cors-origins" | ||
|
||
if os.path.exists(allowed_cors_origins_file): | ||
allowed_cors_origins = open(allowed_cors_origins_file).read().strip().split(",") |
Check warning
Code scanning / CodeQL
File is not always closed Warning
5322f83
to
fae3b67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
export experimental="$(yunohost settings get 'security.experimental.security_experimental_enabled' | int_to_bool)" | ||
export redirect_to_https="$(jq -r '.nginx_redirect_to_https' <<< "$YNH_SETTINGS" | int_to_bool)" | ||
export compatibility="$(jq -r '.nginx_compatibility' <<< "$YNH_SETTINGS" | int_to_bool)" | ||
export experimental="$(jq -r '.security_experimental_enabled' <<< "$YNH_SETTINGS" | int_to_bool)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is moving security.experimental.security_experimental_enabled
to security.nginx.security_experimental_enabled
intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uuuh not sure what you mean ? The setting "long name" is still security.experimental.security_experimental_enabled
but $YNH_SETTINGS
contains only the short name for whatever reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah, I misread the python code associated with the commit
if not option.is_visible(context): | ||
if isinstance(option, BaseInputOption): | ||
# FIXME There could be several use case if the question is not displayed: | ||
# - we doesn't want to give a specific value | ||
# - we want to keep the previous value | ||
# - we want the default value | ||
option.value = context[option.id] = None | ||
context[option.id] = None |
Check failure
Code scanning / CodeQL
Modification of parameter with default Error
default value
option.choices if isinstance(option, BaseChoicesOption) else [] | ||
) | ||
# only update the context with the value | ||
context[option.id] = option.normalize(form[option.id]) |
Check failure
Code scanning / CodeQL
Modification of parameter with default Error
default value
option = next(opt for opt in options if option.id == option_id) | ||
if option and isinstance(option, BaseInputOption): | ||
form[option.id] = option.normalize(value, option) | ||
context[option.id] = form[option.id] |
Check failure
Code scanning / CodeQL
Modification of parameter with default Error
default value
# ╰───────────────────────────────────────────────────────╯ | ||
|
||
if TYPE_CHECKING: | ||
FilterKey = Sequence[Union[str, None]] |
Check notice
Code scanning / CodeQL
Unused global variable Note
|
||
if TYPE_CHECKING: | ||
FilterKey = Sequence[Union[str, None]] | ||
RawConfig = OrderedDict[str, Any] |
Check notice
Code scanning / CodeQL
Unused global variable Note
|
||
def print_config_panel_docs(): | ||
fname = "../src/utils/configpanel.py" | ||
content = open(fname).read() |
Check warning
Code scanning / CodeQL
File is not always closed Warning documentation
|
||
def print_form_doc(): | ||
fname = "../src/utils/form.py" | ||
content = open(fname).read() |
Check warning
Code scanning / CodeQL
File is not always closed Warning documentation
fix data returned by ldap being list, and rename user_fullname to fullname
#2445: Pass email, username and fullname as header for ssowat
…se it's already provided by /etc/nginx/fastcgi_params + make sure it is mapped to the YNH_USER from SSOwat rather than $remote_user
Enh portal tiling
cf YunoHost/issues#2050