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
d98ae4f9
Commit
d98ae4f9
authored
11 years ago
by
Christopher Schäpers
Browse files
Options
Downloads
Patches
Plain Diff
Fix a wrong WebDAV Warning with self-signed-certs
Occuring in the admin interface
parent
7fa0c3b7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/davclient.php
+13
-0
13 additions, 0 deletions
lib/private/davclient.php
lib/private/util.php
+2
-0
2 additions, 0 deletions
lib/private/util.php
with
15 additions
and
0 deletions
lib/private/davclient.php
+
13
−
0
View file @
d98ae4f9
...
...
@@ -29,6 +29,8 @@ class OC_DAVClient extends \Sabre_DAV_Client {
protected
$requestTimeout
;
protected
$verifyHost
;
/**
* @brief Sets the request timeout or 0 to disable timeout.
* @param integer $timeout in seconds or 0 to disable
...
...
@@ -37,10 +39,21 @@ class OC_DAVClient extends \Sabre_DAV_Client {
$this
->
requestTimeout
=
(
int
)
$timeout
;
}
/**
* @brief Sets the CURLOPT_SSL_VERIFYHOST setting
* @param integer $value value to set CURLOPT_SSL_VERIFYHOST to
*/
public
function
setVerifyHost
(
$value
)
{
$this
->
verifyHost
=
$value
;
}
protected
function
curlRequest
(
$url
,
$settings
)
{
if
(
$this
->
requestTimeout
>
0
)
{
$settings
[
CURLOPT_TIMEOUT
]
=
$this
->
requestTimeout
;
}
if
(
!
is_null
(
$this
->
verifyHost
))
{
$settings
[
CURLOPT_SSL_VERIFYHOST
]
=
$this
->
verifyHost
;
}
return
parent
::
curlRequest
(
$url
,
$settings
);
}
}
This diff is collapsed.
Click to expand it.
lib/private/util.php
+
2
−
0
View file @
d98ae4f9
...
...
@@ -902,6 +902,8 @@ class OC_Util {
// for this self test we don't care if the ssl certificate is self signed and the peer cannot be verified.
$client
->
setVerifyPeer
(
false
);
// also don't care if the host can't be verified
$client
->
setVerifyHost
(
0
);
$return
=
true
;
try
{
...
...
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