Skip to content

Conversation

@hamza221
Copy link
Contributor

@hamza221 hamza221 commented Sep 11, 2025

Copy of #54399

Summary

A previous MR(#54055) resulted in the NcActionInput component responsible for creating file shares discarding user provided passwords, in favor of the system generated one.

This was caused by drift between the component and the underlying Share model, resulting in the component calling .sync on a non-existent attribute, which meant the password was never updated.

To reproduce (with password_policy enabled):

  • Under a files "External Shares", click "Create public link"
  • Supply a password to the password field, e.g., "testing-password_123"
  • Click "Create share"
  • Attempt to navigate to the generated share link and access the shared file with the password you provided at the time of creating the share.
  • The provided password will be rejected, as it was never updated from the system generated one.

TODO

N/A

Checklist

A previous MR(54055) resulted in the NcActionInput component responsible
for creating file shares discarding user provided passwords, in favor of
the system generated one.

This was caused by drift between the component and the underlying Share
model, resulting in the component calling .sync on a non-existent
attribute, which meant the password was never updated.

To reproduce (with password_policy enabled):
* Under a files "External Shares", click "Create public link"
* Supply a password to the password field, e.g., "testing-password_123"
* Click "Create share"
* Attempt to navigate to the generated share link and access the shared
  file with the password you provided at the time of creating the share.
* The provided password will be rejected, as it was never updated from
  the system generated one.

Signed-off-by: Darian Culver <darian.culver@catalyst.net.nz>
@hamza221 hamza221 self-assigned this Sep 11, 2025
@hamza221 hamza221 requested a review from a team as a code owner September 11, 2025 11:52
@hamza221 hamza221 added the bug label Sep 11, 2025
@hamza221 hamza221 requested review from susnux and removed request for a team September 11, 2025 11:52
@hamza221 hamza221 added the 3. to review Waiting for reviews label Sep 11, 2025
@hamza221 hamza221 requested review from nfebe and sorbaugh September 11, 2025 11:52
@hamza221
Copy link
Contributor Author

/compile

@github-actions
Copy link
Contributor

Possible performance regression detected

Show Output
An unhandled exception has been thrown:
TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/runner/work/server/server/apps/profiler/lib/Command/Compare.php:35
Stack trace:
#0 /home/runner/work/server/server/apps/profiler/lib/Command/Compare.php(35): array_map()
#1 /home/runner/work/server/server/3rdparty/symfony/console/Command/Command.php(326): OCAProfilerCommandCompare->execute()
#2 /home/runner/work/server/server/core/Command/Base.php(218): SymfonyComponentConsoleCommandCommand->run()
#3 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(1078): OCCoreCommandBase->run()
#4 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(324): SymfonyComponentConsoleApplication->doRunCommand()
#5 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(175): SymfonyComponentConsoleApplication->doRun()
#6 /home/runner/work/server/server/lib/private/Console/Application.php(187): SymfonyComponentConsoleApplication->run()
#7 /home/runner/work/server/server/console.php(91): OCConsoleApplication->run()
#8 /home/runner/work/server/server/occ(33): require_once('...')
#9 {main}

@hamza221
Copy link
Contributor Author

/backport e4b7d65 to stable31

@hamza221
Copy link
Contributor Author

/backport e4b7d65 to stable32

@hamza221
Copy link
Contributor Author

/backport e4b7d65 to stable30

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@github-actions
Copy link
Contributor

Possible performance regression detected

Show Output
An unhandled exception has been thrown:
TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/runner/work/server/server/apps/profiler/lib/Command/Compare.php:35
Stack trace:
#0 /home/runner/work/server/server/apps/profiler/lib/Command/Compare.php(35): array_map()
#1 /home/runner/work/server/server/3rdparty/symfony/console/Command/Command.php(326): OCAProfilerCommandCompare->execute()
#2 /home/runner/work/server/server/core/Command/Base.php(218): SymfonyComponentConsoleCommandCommand->run()
#3 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(1078): OCCoreCommandBase->run()
#4 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(324): SymfonyComponentConsoleApplication->doRunCommand()
#5 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(175): SymfonyComponentConsoleApplication->doRun()
#6 /home/runner/work/server/server/lib/private/Console/Application.php(187): SymfonyComponentConsoleApplication->run()
#7 /home/runner/work/server/server/console.php(91): OCConsoleApplication->run()
#8 /home/runner/work/server/server/occ(33): require_once('...')
#9 {main}

@pabzm pabzm requested a review from artonge September 16, 2025 07:28
Copy link
Contributor

@artonge artonge 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 add a cypress test for it? Just to ensure that it does not break again in the future.

@pabzm
Copy link
Member

pabzm commented Sep 16, 2025

I think this is fixed by #55081 already

@hamza221 hamza221 closed this Sep 16, 2025
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.

[Bug]: External file shares are not created with user provided passwords.

6 participants