-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Validate overwrite.cli.url to be a url in setup check
#31430
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -609,15 +609,14 @@ protected function hasWorkingFileLocking(): bool { | |
| } | ||
|
|
||
| protected function getSuggestedOverwriteCliURL(): string { | ||
| $suggestedOverwriteCliUrl = ''; | ||
| if ($this->config->getSystemValue('overwrite.cli.url', '') === '') { | ||
| $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; | ||
| if (!$this->config->getSystemValue('config_is_read_only', false)) { | ||
| // Set the overwrite URL when it was not set yet. | ||
| $this->config->setSystemValue('overwrite.cli.url', $suggestedOverwriteCliUrl); | ||
| $suggestedOverwriteCliUrl = ''; | ||
| } | ||
| $currentOverwriteCliUrl = $this->config->getSystemValue('overwrite.cli.url', ''); | ||
| $suggestedOverwriteCliUrl = $this->request->getServerProtocol() . '://' . $this->request->getInsecureServerHost() . \OC::$WEBROOT; | ||
|
|
||
| // Check correctness by checking if it is a valid URL | ||
| if (filter_var($currentOverwriteCliUrl, FILTER_VALIDATE_URL)) { | ||
szaimen marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is everyone, especially @juliushaertl fine if we do it like this for now?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, fine with me :)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great, thanks! :)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| $suggestedOverwriteCliUrl = ''; | ||
| } | ||
|
|
||
| return $suggestedOverwriteCliUrl; | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.