Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
229
Merge Requests
229
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
a66922a4
Commit
a66922a4
authored
Jul 08, 2014
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2297535
by marcingy: Remove drupal_get_private_key.
parent
753f2255
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
16 deletions
+1
-16
core/includes/common.inc
core/includes/common.inc
+0
-15
core/modules/simpletest/src/WebTestBase.php
core/modules/simpletest/src/WebTestBase.php
+1
-1
No files found.
core/includes/common.inc
View file @
a66922a4
...
...
@@ -2524,21 +2524,6 @@ function drupal_json_decode($var) {
return
Json
::
decode
(
$var
);
}
/**
* Ensures the private key variable used to generate tokens is set.
*
* @return string
* The private key.
*
* @see \Drupal\Core\Access\CsrfTokenGenerator
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::service('private_key')->get().
*/
function
drupal_get_private_key
()
{
return
\
Drupal
::
service
(
'private_key'
)
->
get
();
}
/**
* Generates a token based on $value, the user session, and the private key.
*
...
...
core/modules/simpletest/src/WebTestBase.php
View file @
a66922a4
...
...
@@ -759,7 +759,7 @@ protected function drupalUserIsLoggedIn($account) {
* Generate a token for the currently logged in user.
*/
protected
function
drupalGetToken
(
$value
=
''
)
{
$private_key
=
drupal_get_private_key
();
$private_key
=
\
Drupal
::
service
(
'private_key'
)
->
get
();
return
Crypt
::
hmacBase64
(
$value
,
$this
->
session_id
.
$private_key
);
}
...
...
Write
Preview
Markdown
is supported
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