-
Notifications
You must be signed in to change notification settings - Fork 95
Add passwordProtected flag to OCShares #149
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
Conversation
| mUserId = source.readLong(); | ||
| mRemoteId = source.readLong(); | ||
| mShareLink = source.readString(); | ||
| mIsPasswordProtected = source.readInt() == 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.
We are writing a 1 if mIsPasswortProtected is true in line 346, but compare with 0?
So if mIsPasswortProteced = true, then
on write: dest.writeInt(1).
on read: source.readInt() == 0 --> 1 == 0 --> false --> mIsPasswordProtected = false
All good :) Fixed your comment :) -> 431cf90 |
|
@mario @tobiasKaminsky please review, this PR is needed by nextcloud/android#2671 @tobiasKaminsky well, please re-review since I fixed your comment :) |
|
AWAITING 2ND PEER REVIEW SINCE 8 DAYS // AWAITING RE-REVIEW SINCE 5 DAYS @mario @tobiasKaminsky please review, this PR is needed by nextcloud/android#2671 @tobiasKaminsky well, please re-review since I fixed your comment :) |
At the moment the server supports setting a password for a share link and for an email share. The fact that a share is actually password protected isn't reflected in the OCShare object.
For links that has been fine since if shared-with is set is is password protected (even though this sounds strange...). This mechanism however won't work for email shares thus the client using the library should be able to parse/get/set this info and later store this fact to the database.