Skip to content

Conversation

@szaimen
Copy link
Contributor

@szaimen szaimen commented Mar 3, 2022

Close #31429

Signed-off-by: szaimen szaimen@e.mail.de

@szaimen szaimen added this to the Nextcloud 24 milestone Mar 3, 2022
@szaimen szaimen force-pushed the enh/31429/improve-overwrite-cli-url-check branch 10 times, most recently from dec1fec to 141177c Compare March 3, 2022 19:11
@nextcloud-command nextcloud-command force-pushed the enh/31429/improve-overwrite-cli-url-check branch from 141177c to 225cc2e Compare March 3, 2022 22:17
@szaimen
Copy link
Contributor Author

szaimen commented Mar 3, 2022

/backport to stable23

@szaimen
Copy link
Contributor Author

szaimen commented Mar 3, 2022

/backport to stable22

@szaimen szaimen marked this pull request as ready for review March 3, 2022 22:33
@szaimen szaimen requested review from a team, CarlSchwan, nickvergessen and skjnldsv and removed request for a team March 3, 2022 22:33
@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 3, 2022
@szaimen szaimen requested a review from MichaIng March 3, 2022 22:34
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you state what the improvement is?
From reading the code the improvement is that you can now have false positives for a warning?

@szaimen szaimen removed the 3. to review Waiting for reviews label Mar 4, 2022
@szaimen szaimen added the 2. developing Work in progress label Mar 4, 2022
@szaimen szaimen requested a review from nickvergessen March 4, 2022 09:40
@nickvergessen nickvergessen changed the title improve overwrite cli url setup check Validate overwrite.cli.url to be a url in setup check Mar 4, 2022
@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 4, 2022
@szaimen szaimen force-pushed the enh/31429/improve-overwrite-cli-url-check branch from e0d48e9 to 1947ed3 Compare March 4, 2022 09:51
@szaimen szaimen requested review from julien-nc and juliusknorr March 4, 2022 10:22
Signed-off-by: szaimen <szaimen@e.mail.de>
@szaimen szaimen force-pushed the enh/31429/improve-overwrite-cli-url-check branch from e58122e to 4191a17 Compare March 9, 2022 21:26
$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)) {
Copy link
Contributor Author

@szaimen szaimen Mar 9, 2022

Choose a reason for hiding this comment

The 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?
After merging, I will rebase Carls PR and change it there to use his validation logic but since I want to backport this we will not have the validation logic in place.
For me the most important change of this PR is to make admins aware of this config which the PR does. Since the warning is only shown in the admin panel, it is in my opinion no big problem if it is sometimes false-positive because of this unperfect filter and will not cause any harm.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fine with me :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks! :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@szaimen
Copy link
Contributor Author

szaimen commented Mar 10, 2022

Thanks everyone! Merging then :)

@szaimen szaimen merged commit 3a0b934 into master Mar 10, 2022
@szaimen szaimen deleted the enh/31429/improve-overwrite-cli-url-check branch March 10, 2022 11:41
@szaimen
Copy link
Contributor Author

szaimen commented Mar 10, 2022

/backport to stable23

@szaimen
Copy link
Contributor Author

szaimen commented Mar 10, 2022

/backport to stable22

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.

improve setup test that checks the overwrite cli url

6 participants