Skip to content

feat(deps): Upgrade phpseclib to v3#48183

Open
susnux wants to merge 5 commits into
masterfrom
fix/deps/php-seclin
Open

feat(deps): Upgrade phpseclib to v3#48183
susnux wants to merge 5 commits into
masterfrom
fix/deps/php-seclin

Conversation

@susnux

@susnux susnux commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

Summary

Updated to v3 - needed to adjust quiet some places.
AI was just used for 3983f8a to help finding a working alternative because the old implementation was using v2 private functions which were not PHP private but just prefixed with _.
In v3 they made them really private so we have two options:

  • drop our custom streams and use the streams provided by the library
  • the solution implemented here using reflection to hack around the private fields...

Checklist

@susnux

susnux commented Nov 5, 2024

Copy link
Copy Markdown
Contributor Author

Problem with this:
Checker::createSignatureData does create a different signature... No idea what is happening the parameters are the same.

@joshtrichards

Copy link
Copy Markdown
Member

Perhaps phpseclib2_compat as an intermediate step for v31+ (or at least v32+)?

https://phpseclib.com/docs/why#phpseclib2_compat

Comment thread apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php Outdated
Comment thread apps/files_external/lib/Lib/Auth/PublicKey/RSAPrivateKey.php Outdated
Comment thread apps/files_external/lib/MountConfig.php
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Comment thread apps/files_external/lib/Lib/Auth/PublicKey/RSA.php
@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
@susnux susnux removed this from the Nextcloud 34.0.1 milestone Jun 9, 2026
@susnux
susnux force-pushed the fix/deps/php-seclin branch from 69e115c to 0bee9d3 Compare July 19, 2026 20:24
@susnux
susnux force-pushed the fix/deps/php-seclin branch 6 times, most recently from 5373ef7 to 3983f8a Compare July 19, 2026 21:44
@susnux susnux added this to the Nextcloud 35 milestone Jul 19, 2026
@susnux susnux added 4. to release Ready to be released and/or waiting for tests to finish 3. to review Waiting for reviews and removed 2. developing Work in progress 4. to release Ready to be released and/or waiting for tests to finish labels Jul 19, 2026
@susnux
susnux marked this pull request as ready for review July 20, 2026 09:37
@susnux
susnux requested a review from a team as a code owner July 20, 2026 09:37
@susnux
susnux requested review from icewind1991, joshtrichards, nfebe and sorbaugh and removed request for a team July 20, 2026 09:37

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Any options on this solution?
Should we keep the "performance" streams with reflection or drop them completely and just use the library streams?

susnux and others added 5 commits July 20, 2026 16:05
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Updated RSA key loading to use PSS padding and options.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
The implementation was using private fields of v2, which are now
properly marked as private.
So either drop the custom streams or use reflection.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux force-pushed the fix/deps/php-seclin branch from 3983f8a to 8b24535 Compare July 20, 2026 14:05
@nickvergessen nickvergessen added the pending documentation This pull request needs an associated documentation update label Jul 20, 2026
@nickvergessen

Copy link
Copy Markdown
Member

Should document this change, as it breaks at least 2 shipped apps (app_api, nextcloud_announcements) by removing phpseclib 2, and integration_discourse because it ships phpseclib 3 without mozart/namespacing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted bug feature: external storage help wanted pending documentation This pull request needs an associated documentation update security

Projects

None yet

8 participants