Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.

Commit 44c4094

Browse files
Seth BattisSeth Battis
authored andcommitted
URL Encoding
Signed-off-by: Seth Battis <[email protected]>
1 parent 483ee60 commit 44c4094

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

import.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030
require_once(__DIR__ . '/common.inc.php');
3131

3232
if (isset($argc)) {
33-
$_REQUEST['cal'] = $argv[1];
34-
$_REQUEST['canvas_url'] = $argv[2];
35-
$_REQUEST['schedule'] = $argv[3];
33+
$_REQUEST['cal'] = urldecode($argv[1]);
34+
$_REQUEST['canvas_url'] = urldecode($argv[2]);
35+
$_REQUEST['schedule'] = urldecode($argv[3]);
3636
}
37+
print_r($_REQUEST);
3738

3839
/**
3940
* compute the calendar context for the canvas object based on its URL

sync.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
`id` = '{$schedule['calendar']}'
2727
");
2828
if ($calendar = $calendarResponse->fetch_assoc()) {
29-
shell_exec("php import.php {$calendar['ics_url']} {$calendar['canvas_url']} {$schedule['id']}");
29+
shell_exec('php import.php ' . urlencode($calendar['ics_url']) . ' ' . urlencode($calendar['canvas_url']) . ' ' . urlencode($schedule['id']));
3030
}
3131
}
3232

0 commit comments

Comments
 (0)