Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

feat(setupcheck): Check several config values to be valid URLs (and more) - #45382

Closed
nickvergessen wants to merge 1 commit into
masterfrom
feat/45085/validate-config-values
Closed

nickvergessen wants to merge 1 commit into
masterfrom
feat/45085/validate-config-values

Conversation

@nickvergessen

Copy link
Copy Markdown
Member

TODO

  • Validate that several configs are valid URLs or of hardcoded other format
  • Make sure overwrite.cli.url is within trusted_domains
  • Mark more of those configs as sensitive

Checklist

…ore)

Signed-off-by: Joas Schilling <coding@schilljs.com>
}

if (filter_var($parts[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
if (!is_numeric($parts[1]) || $parts[1] > 32 || $parts[1] < 1) {

Check notice

Code scanning / Psalm

PossiblyUndefinedArrayOffset

Possibly undefined array key $parts[1] on list{0: string, 1?: string}
return SetupResult::error($this->l10n->t('Config value %s is not an valid IP address or IP range.', [$configKey]));
}
} elseif (filter_var($parts[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
if (!is_numeric($parts[1]) || $parts[1] > 128 || $parts[1] < 1) {

Check notice

Code scanning / Psalm

PossiblyUndefinedArrayOffset

Possibly undefined array key $parts[1] on list{0: string, 1?: string}
@kesselb

kesselb commented May 17, 2024

Copy link
Copy Markdown
Contributor

Good idea 👍

Some people were confused with the well-known setup check because it stops on the first failure.

I fear this could be confusing here as well if you encounter many issues in the configuration file.

@susnux

susnux commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request as it has been in draft state without any activity for more than six months.
If you are still interested in this change, feel free to revive it and reopen it (or ask us to reopen it if you cannot).
Thank you for your contribution!

@susnux susnux closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: occ config:list system does not redact trusted_domains and overwrite.cli.url

8 participants