Skip to content
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

Merged
merged 563 commits into from
Oct 31, 2024
Merged

Bookworm + Portal rework #1657

merged 563 commits into from
Oct 31, 2024

Conversation

alexAubin
Copy link
Member

@alexAubin alexAubin force-pushed the bookworm branch 2 times, most recently from cd1bb22 to bed9ecc Compare May 15, 2023 20:13
debian/changelog Outdated Show resolved Hide resolved
src/user.py Fixed Show fixed Hide fixed
@alexAubin alexAubin force-pushed the bookworm branch 4 times, most recently from 945ecdb to 8ac48ee Compare June 14, 2023 06:07
@alexAubin alexAubin added the 🏗️ Major project Big decision label Jul 10, 2023
src/dyndns.py Fixed Show fixed Hide fixed
src/dyndns.py Fixed Show fixed Hide fixed
src/utils/form.py Fixed Show fixed Hide fixed
src/utils/form.py Fixed Show fixed Hide fixed
src/utils/form.py Fixed Show fixed Hide fixed
src/utils/form.py Fixed Show fixed Hide fixed
src/utils/form.py Fixed Show fixed Hide fixed
@alexAubin alexAubin changed the title Bookworm Bookworm + Portal rework Sep 27, 2023
src/authenticators/ldap_ynhuser.py Fixed Show fixed Hide fixed
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

File is opened but is not closed.
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

File is opened but is not closed.
@alexAubin alexAubin marked this pull request as draft September 27, 2023 18:12
@alexAubin alexAubin force-pushed the bookworm branch 2 times, most recently from 5322f83 to fae3b67 Compare October 6, 2023 15:22
Copy link

@github-advanced-security github-advanced-security bot left a 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)"
Copy link
Member

@kay0u kay0u Nov 29, 2023

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?

Copy link
Member Author

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

Copy link
Member

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

This expression mutates a
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

This expression mutates a
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

This expression mutates a
default value
.
# ╰───────────────────────────────────────────────────────╯

if TYPE_CHECKING:
FilterKey = Sequence[Union[str, None]]

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'FilterKey' is not used.

if TYPE_CHECKING:
FilterKey = Sequence[Union[str, None]]
RawConfig = OrderedDict[str, Any]

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'RawConfig' is not used.

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

File is opened but is not closed.

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

File is opened but is not closed.
src/utils/form.py Fixed Show fixed Hide fixed
src/authenticators/ldap_ynhuser.py Fixed Show fixed Hide fixed
src/tests/test_permission.py Dismissed Show dismissed Hide dismissed
src/authenticators/ldap_ynhuser.py Fixed Show fixed Hide fixed
src/authenticators/ldap_ynhuser.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Dismissed Show dismissed Hide dismissed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Dismissed Show dismissed Hide dismissed
src/tests/test_sso_and_portalapi.py Dismissed Show dismissed Hide dismissed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
src/tests/test_sso_and_portalapi.py Fixed Show fixed Hide fixed
Josue-T and others added 26 commits October 25, 2024 22:38
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
@Salamandar Salamandar marked this pull request as ready for review October 31, 2024 17:17
@alexAubin alexAubin merged commit 85e904a into dev Oct 31, 2024
1 of 3 checks passed
@alexAubin alexAubin deleted the bookworm branch October 31, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.