Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
9489852e
Commit
9489852e
authored
Sep 29, 2014
by
Thomas Müller
Browse files
Merge pull request #11357 from owncloud/kill-dead-code
Remove dead code
parents
6b45cb54
41374986
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/private/appframework/http/request.php
View file @
9489852e
...
...
@@ -350,7 +350,6 @@ class Request implements \ArrayAccess, \Countable, IRequest {
/**
* Checks if the CSRF check was correct
* @return bool true if CSRF check passed
* @see OC_Util::$callLifespan
* @see OC_Util::callRegister()
*/
public
function
passesCSRFCheck
()
{
...
...
lib/private/util.php
View file @
9489852e
...
...
@@ -896,29 +896,14 @@ class OC_Util {
return
$id
;
}
/**
* Static lifespan (in seconds) when a request token expires.
*
* @see OC_Util::callRegister()
* @see OC_Util::isCallRegistered()
* @description
* Also required for the client side to compute the point in time when to
* request a fresh token. The client will do so when nearly 97% of the
* time span coded here has expired.
*/
public
static
$callLifespan
=
3600
;
// 3600 secs = 1 hour
/**
* Register an get/post call. Important to prevent CSRF attacks.
*
* @todo Write howto: CSRF protection guide
* @return string Generated token.
* @description
* Creates a 'request token' (random) and stores it inside the session.
* Ever subsequent (ajax) request must use such a valid token to succeed,
* otherwise the request will be denied as a protection against CSRF.
* The tokens expire after a fixed lifespan.
* @see OC_Util::$callLifespan
* @see OC_Util::isCallRegistered()
*/
public
static
function
callRegister
()
{
...
...
@@ -938,7 +923,6 @@ class OC_Util {
* Check an ajax get/post call if the request token is valid.
*
* @return boolean False if request token is not set or is invalid.
* @see OC_Util::$callLifespan
* @see OC_Util::callRegister()
*/
public
static
function
isCallRegistered
()
{
...
...
@@ -948,7 +932,6 @@ class OC_Util {
/**
* Check an ajax get/post call if the request token is valid. Exit if not.
*
* @todo Write howto
* @return void
*/
public
static
function
callCheck
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment