Skip to content

Commit

Permalink
EQ-1012 More urlencode() fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongsheng Cai committed Mar 18, 2014
1 parent 859b3fd commit d4e8d79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function equella_getssotoken_raw($username, $shareid, $sharedsecret) {
$time = time() . '000';
$hash = md5($username . $shareid . $time . $sharedsecret);
$params = array();
$params[] = urlencode($username);
$params[] = rawurlencode($username);
$params[] = $shareid;
$params[] = $time;
$params[] = base64_encode(pack('H*', $hash));
Expand All @@ -136,7 +136,7 @@ function equella_appendtoken($url, $token = null) {
$token = equella_getssotoken();
}
$url .= (strpos($url, '?') != false) ? '&' : '?';
$url .= 'token=' . urlencode($token);
$url .= 'token=' . rawurlencode($token);
return $url;
}

Expand Down
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function equella_delete_instance($id) {
if ($equella->activation)
{
$url = str_replace("signon.do", "access/activationwebservice.do", $CFG->equella_url);
$url = equella_appendtoken($url)."&activationUuid=".urlencode($equella->activation);
$url = equella_appendtoken($url)."&activationUuid=".rawurlencode($equella->activation);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($curl);
Expand Down

0 comments on commit d4e8d79

Please sign in to comment.