Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
126a0cac
Commit
126a0cac
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #3473 from opensaucesystems/master
Small update to user_webdavauth
parents
0ac7c571
acba7d7b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/user_webdavauth/templates/settings.php
+1
-1
1 addition, 1 deletion
apps/user_webdavauth/templates/settings.php
apps/user_webdavauth/user_webdavauth.php
+8
-2
8 additions, 2 deletions
apps/user_webdavauth/user_webdavauth.php
with
9 additions
and
3 deletions
apps/user_webdavauth/templates/settings.php
+
1
−
1
View file @
126a0cac
<form
id=
"webdavauth"
action=
"#"
method=
"post"
>
<fieldset
class=
"personalblock"
>
<legend><strong>
<?php
p
(
$l
->
t
(
'WebDAV Authentication'
));
?>
</strong></legend>
<p><label
for=
"webdav_url"
>
<?php
p
(
$l
->
t
(
'URL:
http://
'
));
?>
<input
type=
"
text
"
id=
"webdav_url"
name=
"webdav_url"
value=
"
<?php
p
(
$_
[
'webdav_url'
]);
?>
"
></label>
<p><label
for=
"webdav_url"
>
<?php
p
(
$l
->
t
(
'URL: '
));
?>
<input
type=
"
url"
placeholder=
"https://example.com/webdav
"
id=
"webdav_url"
name=
"webdav_url"
value=
"
<?php
p
(
$_
[
'webdav_url'
]);
?>
"
></label>
<input
type=
"hidden"
name=
"requesttoken"
value=
"
<?php
p
(
$_
[
'requesttoken'
])
?>
"
id=
"requesttoken"
>
<input
type=
"submit"
value=
"Save"
/>
<br
/>
<?php
p
(
$l
->
t
(
'ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials.'
));
?>
...
...
This diff is collapsed.
Click to expand it.
apps/user_webdavauth/user_webdavauth.php
+
8
−
2
View file @
126a0cac
...
...
@@ -41,10 +41,16 @@ class OC_USER_WEBDAVAUTH extends OC_User_Backend {
}
public
function
checkPassword
(
$uid
,
$password
)
{
$url
=
'http://'
.
urlencode
(
$uid
)
.
':'
.
urlencode
(
$password
)
.
'@'
.
$this
->
webdavauth_url
;
$arr
=
explode
(
'://'
,
$this
->
webdavauth_url
,
2
);
if
(
!
isset
(
$arr
)
OR
count
(
$arr
)
!==
2
)
{
OC_Log
::
write
(
'OC_USER_WEBDAVAUTH'
,
'Invalid Url: "'
.
$this
->
webdavauth_url
.
'" '
,
3
);
return
false
;
}
list
(
$webdavauth_protocol
,
$webdavauth_url_path
)
=
$arr
;
$url
=
$webdavauth_protocol
.
'://'
.
urlencode
(
$uid
)
.
':'
.
urlencode
(
$password
)
.
'@'
.
$webdavauth_url_path
;
$headers
=
get_headers
(
$url
);
if
(
$headers
==
false
)
{
OC_Log
::
write
(
'OC_USER_WEBDAVAUTH'
,
'Not possible to connect to WebDAV Url: "'
.
$
this
->
webdavauth_url
.
'" '
,
3
);
OC_Log
::
write
(
'OC_USER_WEBDAVAUTH'
,
'Not possible to connect to WebDAV Url: "'
.
$
webdavauth_protocol
.
'://'
.
$
webdavauth_url
_path
.
'" '
,
3
);
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment