Skip to content

Commit

Permalink
MDL-37432 Calendar: Added check for empty calendar url
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Jan 21, 2013
1 parent 7def533 commit 76657ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion calendar/managesubscriptions_form.php
Expand Up @@ -123,7 +123,9 @@ public function validation($data, $files) {
} }
} }
} else if (($data['importfrom'] == CALENDAR_IMPORT_FROM_URL)) { } else if (($data['importfrom'] == CALENDAR_IMPORT_FROM_URL)) {
if (clean_param($data['url'], PARAM_URL) !== $data['url']) { // Clean input calendar url.
$url = clean_param($data['url'], PARAM_URL);
if (empty($url) || ($url !== $data['url'])) {
$errors['url'] = get_string('invalidurl', 'error'); $errors['url'] = get_string('invalidurl', 'error');
} }
} else { } else {
Expand Down

0 comments on commit 76657ed

Please sign in to comment.