-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Share20OcsController no longer provides info whether public link share is password-protected #35541
Comments
@felix-schwarz |
Seems to be a security issue. |
@felix-schwarz I agree with your proposal. Lets make it conditional. I will add it to the sprint. |
@felix-schwarz Not sure If I understand the proposed fix (or maybe the problem). To my understanding ShareWith() will always be empty for public links as they have no explicit recipient.
Before the fix both field share_with and share_with_displayname contained the password. So I propose we rather check for $share->getPassword() instead of $share->getSharedWith(). If a password is set we fill respective fields with "redacted". |
The iOS client uses the presence of these fields to determine if a password is required. Despite their names they are historically used to store pw-hashes for public-links.
@micbar @felix-schwarz WIP fix here: #35544, please comment/test. |
@IljaN Your proposal makes sense. @michaelstingl @felix-schwarz Is there a blue ticket for this? Does the fix work for this problem too? |
@IljaN Thanks for the explanation! Was just best-guessing above (I'm not familiar with the internals of the OC server sources). #35544 looks exactly like what's needed then. Thanks! Is there any easy way for me to quickly bring up an instance with these changes, so I can run the OC iOS SDK's unit tests against it? |
@felix-schwarz
|
Yeah, I think I've seen something similar, but I can't find it right now. We'll need QA with all client platforms on Monday. (maybe also adjustments in the smoke tests) /cc @jesmrec @HanaGemela
@felix-schwarz Just patch the |
The iOS client uses the presence of these fields to determine if a password is required. Despite their names they are historically used to store pw-hashes for public-links.
The iOS client uses the presence of these fields to determine if a password is required. Despite their names they are historically used to store pw-hashes for public-links.
@michaelstingl Good idea. Tried to do this, but couldn't proceed past trying to fire up a fresh 10.2 instance. Using this minimal
… the server is stuck during startup both using Docker for Mac as well as trying the same with Docker running in an Ubuntu instance. Both do not proceed past starting apache:
It's not possible to connect to this server, then. This |
@micbar the issues related to password are |
Thank you! |
The iOS client uses the presence of these fields to determine if a password is required. Despite their names they are historically used to store pw-hashes for public-links.
The iOS client uses the presence of these fields to determine if a password is required. Despite their names they are historically used to store pw-hashes for public-links.
[release-10.2.1] Return "password fields" only if public-link password is set. #35541
Squashed commits: commit 00b0904 Author: Felix Schwarz <[email protected]> Date: Mon Jun 24 09:24:52 2019 +0200 - Rename NSString+OCParentPath to NSString+OCPath and add additional methods to - normalize strings representing directories - compose paths following the OCPath schema (whereby all directories need to end with a trailing "/") - Adopt the new OCPath methods across the SDK - Fix issue where, when creating a folder, a placeholder item with an incorrect path (missing the trailing "/") would be created, leading to issue when creating an OCQuery on that placeholder item commit 31f6a85 Author: Michael Neuwert <[email protected]> Date: Tue Jun 18 21:40:01 2019 +0200 Added [OCLogFileWriter rotate] public API commit 5305d4f Author: Michael Neuwert <[email protected]> Date: Tue Jun 18 21:34:07 2019 +0200 Changed log file name commit 8a183b9 Author: Matthias Hühne <[email protected]> Date: Tue Jun 18 21:26:26 2019 +0200 - added missing localization strings - added format string to localized string to append item name commit 8054a1f Author: Matthias Hühne <[email protected]> Date: Mon Jun 17 13:36:18 2019 +0200 removed static ownCloud.log file name with dynamic (branded) app name for log files (QA finding 15) commit fa70e38 Author: Felix Schwarz <[email protected]> Date: Fri Jun 14 17:20:25 2019 +0200 - Temporarily remove public link share password protection checks due to owncloud/core#35541 commit 64c68af Author: Felix Schwarz <[email protected]> Date: Fri Jun 14 17:00:46 2019 +0200 - Fix broken/fragile tests commit 9525b4d Author: Felix Schwarz <[email protected]> Date: Fri Jun 14 15:56:55 2019 +0200 - Add support for "oc:checksum" XML decoding - Uploads that result in a "PRECONDITION FAILED" (in this case, WebDAV code for "a file already exists here") don't immediately return an error, but instead request the checksum of the remote file. If the checksum of the file to upload matches the checksum of the file on the server, no error is returned commit b9c1d57 Author: Felix Schwarz <[email protected]> Date: Thu Jun 13 23:40:29 2019 +0200 - Add option to indicate whether a thumbnail request while offline should wait for connectivity to resume - or return with an error when offline commit 48fc614 Author: Felix Schwarz <[email protected]> Date: Thu Jun 13 22:54:05 2019 +0200 - OCCore+ConnectionStatus: reschedule dropped requests that require the online signal commit ab17381 Author: Felix Schwarz <[email protected]> Date: Wed Jun 12 12:12:53 2019 +0200 - Improved logging for OCHTTPPipeline recovery and OCHTTPPipelineTask description - OCCore+ConnectionStatus now recognizes more "connection unavailable" / "offline" errors and handles them accordingly
squashed commit of the following commits: commit 00b0904 Author: Felix Schwarz <[email protected]> Date: Mon Jun 24 09:24:52 2019 +0200 - Rename NSString+OCParentPath to NSString+OCPath and add additional methods to - normalize strings representing directories - compose paths following the OCPath schema (whereby all directories need to end with a trailing "/") - Adopt the new OCPath methods across the SDK - Fix issue where, when creating a folder, a placeholder item with an incorrect path (missing the trailing "/") would be created, leading to issue when creating an OCQuery on that placeholder item commit 31f6a85 Author: Michael Neuwert <[email protected]> Date: Tue Jun 18 21:40:01 2019 +0200 Added [OCLogFileWriter rotate] public API commit 5305d4f Author: Michael Neuwert <[email protected]> Date: Tue Jun 18 21:34:07 2019 +0200 Changed log file name commit 8a183b9 Author: Matthias Hühne <[email protected]> Date: Tue Jun 18 21:26:26 2019 +0200 - added missing localization strings - added format string to localized string to append item name commit 8054a1f Author: Matthias Hühne <[email protected]> Date: Mon Jun 17 13:36:18 2019 +0200 removed static ownCloud.log file name with dynamic (branded) app name for log files (QA finding 15) commit fa70e38 Author: Felix Schwarz <[email protected]> Date: Fri Jun 14 17:20:25 2019 +0200 - Temporarily remove public link share password protection checks due to owncloud/core#35541 commit 64c68af Author: Felix Schwarz <[email protected]> Date: Fri Jun 14 17:00:46 2019 +0200 - Fix broken/fragile tests commit 9525b4d Author: Felix Schwarz <[email protected]> Date: Fri Jun 14 15:56:55 2019 +0200 - Add support for "oc:checksum" XML decoding - Uploads that result in a "PRECONDITION FAILED" (in this case, WebDAV code for "a file already exists here") don't immediately return an error, but instead request the checksum of the remote file. If the checksum of the file to upload matches the checksum of the file on the server, no error is returned commit b9c1d57 Author: Felix Schwarz <[email protected]> Date: Thu Jun 13 23:40:29 2019 +0200 - Add option to indicate whether a thumbnail request while offline should wait for connectivity to resume - or return with an error when offline commit 48fc614 Author: Felix Schwarz <[email protected]> Date: Thu Jun 13 22:54:05 2019 +0200 - OCCore+ConnectionStatus: reschedule dropped requests that require the online signal commit ab17381 Author: Felix Schwarz <[email protected]> Date: Wed Jun 12 12:12:53 2019 +0200 - Improved logging for OCHTTPPipeline recovery and OCHTTPPipelineTask description - OCCore+ConnectionStatus now recognizes more "connection unavailable" / "offline" errors and handles them accordingly
Tested with desktop client 2.5.4 and server 10.2.1.RC1 |
Steps to reproduce
Expected behaviour
For public link shares with a password, the record included
share_with
andshare_with_displayname
with values, looking like this:For public link shares without password, the
share_with
andshare_with_displayname
records were not included:Actual behaviour
The
share_with
andshare_with_displayname
tags are now always included for all public links, regardless of whether they have a password set:Possible solutions
I believe this code segment to be responsible for this:
If it only returned the two tags
***redacted***
if the share has a password set, it'd match past behaviour. Speculatively, the code would look something like this then:Impact
This change in
Share20OcsController
currently breaks the newios-sdk
's ability to provide accurate information to the app on whether a public link share has its password set. It currently indicates this for all public link shares for server versions returning***redacted***
.Server configuration
Reproduced using
demo.owncloud.org
runningownCloud 10.2.0 (stable)
.The text was updated successfully, but these errors were encountered: