mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-33501 - oauth2lib: enforce sesskey in oauth2callback.php
The sesskey needs to be embeded in the local url returned as this is the only parameter we have control of.
This commit is contained in:
parent
db7602af7c
commit
5df1b73748
3 changed files with 17 additions and 5 deletions
|
@ -39,8 +39,10 @@ class repository_googledocs extends repository {
|
|||
public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
|
||||
parent::__construct($repositoryid, $context, $options);
|
||||
|
||||
$returnurl = new moodle_url('/repository/repository_callback.php',
|
||||
array('callback' => 'yes', 'repo_id' =>$this->id));
|
||||
$returnurl = new moodle_url('/repository/repository_callback.php');
|
||||
$returnurl->param('callback', 'yes');
|
||||
$returnurl->param('repo_id', $this->id);
|
||||
$returnurl->param('sesskey', sesskey());
|
||||
|
||||
$clientid = get_config('googledocs', 'clientid');
|
||||
$secret = get_config('googledocs', 'secret');
|
||||
|
|
|
@ -41,8 +41,10 @@ class repository_picasa extends repository {
|
|||
public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
|
||||
parent::__construct($repositoryid, $context, $options);
|
||||
|
||||
$returnurl = new moodle_url('/repository/repository_callback.php',
|
||||
array('callback' => 'yes', 'repo_id' =>$this->id));
|
||||
$returnurl = new moodle_url('/repository/repository_callback.php');
|
||||
$returnurl->param('callback', 'yes');
|
||||
$returnurl->param('repo_id', $this->id);
|
||||
$returnurl->param('sesskey', sesskey());
|
||||
|
||||
$clientid = get_config('picasa', 'clientid');
|
||||
$secret = get_config('picasa', 'secret');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue