-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix version comparison #723
Conversation
577ac6a
to
a672ead
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
a672ead
to
3776d6a
Compare
lib/Service/OauthService.php
Outdated
case version_compare($nextcloudVersion, '30.0.0.0') >= 0: | ||
case version_compare($nextcloudVersion, '29.0.7.0') >= 0 && version_compare($nextcloudVersion, '30.0.0.0') < 0: | ||
case version_compare($nextcloudVersion, '28.0.10.0') >= 0 && version_compare($nextcloudVersion, '29.0.0.0') < 0: | ||
case version_compare($nextcloudVersion, '27.1.11.8') >= 0 && version_compare($nextcloudVersion, '28.0.0.0') < 0: |
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.
@julien-nc has provided some specific nextcloud version with minipatch version as well like 27.1.11.8
in work package https://community.openproject.org/projects/nextcloud-integration/work_packages/57654/activity. I think we need to be sure that the hash encryption (new change in Nextcloud) is included for all NC versions that is listed on work packages. For example in the work package its says hash is included in 30. does it mean 30.0.0.0 or 30.0.0.2 or 30.0.0.3? It is not very specific. I think may be we need to be very specific at this case for this code? Adding zero may be won't work?
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.
good point, please find out the micro versions
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.
- Secrets are hashed in all v30.x . The v30 release was actually 30.0.0.14
- Secrets are hashed in v29.0.7 and higher. The v29.0.7 release was 29.0.7.1
- Secrets are hashed in v28.0.10 and higher. The v28.0.10 release was 28.0.10.1
⚠️ Secrets are hashed in v27.1.11.9 and higher. The v27.1.11 release was actually 27.1.11.3 and still encrypts (does not hash yet). The enterprise release 27.1.11.9 hashes the secrets. Micro version is indeed important for 27.
c4c04d3
to
ba20b94
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
ba20b94
to
748825f
Compare
PHP Code CoverageCoverage after merging fix/version-comparison into master will be
Coverage Report
|
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.
LGTM 👍
* Fix version comparison for stable27 Signed-off-by: nabim777 <nabinalemagar019@gmail.com> * mini patch updated Signed-off-by: nabim777 <nabinalemagar019@gmail.com> --------- Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
[Backport] Fix version comparison (#723)
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Description
The method getVersion() returns with 4 digit array Example: [27,0,0,7] which fails on the line https://github.com/nextcloud/integration_openproject/blob/master/lib/Service/OauthService.php#L62
This error is seen on nextcloud 27 version (i.e when variable $nextcloudversion is 27.0.0)
So, this PR is for fixing such error
Step to reproduce
\server
and Checkout to thev27.0.0
Related Issue or Workpackage
Screen Record :
While oauth configuration on stable27 branch we got following error:
Screencast from 10-25-2024 02:29:03 PM.webm
Types of changes
Checklist:
CHANGELOG.md
file