Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
adding share type circles
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl authored and Backportbot committed Dec 11, 2019
commit 1420cd5a7e19a7c881c98d515b28d3a1e775e6b2
5 changes: 4 additions & 1 deletion apps/dav/lib/Connector/PublicAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ protected function validateUserPass($username, $password) {

// check if the share is password protected
if ($share->getPassword() !== null) {
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK || $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) {

if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK
|| $share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL
|| $share->getShareType() === \OCP\Share::SHARE_TYPE_CIRCLE) {
if ($this->shareManager->checkPassword($share, $password)) {
return true;
} else if ($this->session->exists('public_link_authenticated')
Expand Down
3 changes: 2 additions & 1 deletion lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,8 @@ protected function checkExpireDate($share) {
*/
public function checkPassword(\OCP\Share\IShare $share, $password) {
$passwordProtected = $share->getShareType() !== \OCP\Share::SHARE_TYPE_LINK
|| $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL;
|| $share->getShareType() !== \OCP\Share::SHARE_TYPE_EMAIL
|| $share->getShareType() !== \OCP\Share::SHARE_TYPE_CIRCLE;
if (!$passwordProtected) {
//TODO maybe exception?
return false;
Expand Down