Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-29619-m21' of git://github.com/ankitagarwal/moodle …

…into MOODLE_21_STABLE
  • Loading branch information...
commit fdb8574046588d3d606babd86e00c82ab8272e0b 2 parents 8eb6f9f + 49b266c
Aparup Banerjee nebgor authored

Showing 2 changed files with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  mod/url/lang/en/url.php
  2. +6 0 mod/url/view.php
1  mod/url/lang/en/url.php
@@ -44,6 +44,7 @@
44 44 $string['displayselectexplain'] = 'Choose display type, unfortunately not all types are suitable for all URLs.';
45 45 $string['externalurl'] = 'External URL';
46 46 $string['framesize'] = 'Frame height';
  47 +$string['invalidstoredurl'] = 'Invalid URL';
47 48 $string['chooseavariable'] = 'Choose a variable...';
48 49 $string['invalidurl'] = 'Entered URL is invalid';
49 50 $string['modulename'] = 'URL';
6 mod/url/view.php
@@ -55,6 +55,12 @@
55 55
56 56 $PAGE->set_url('/mod/url/view.php', array('id' => $cm->id));
57 57
  58 +// Make sure URL is valid before generating output
  59 +$url->externalurl = clean_param($url->externalurl, PARAM_URL);
  60 +if (empty($url->externalurl)) {
  61 + print_error('invalidstoredurl', 'url');
  62 +}
  63 +
58 64 if ($redirect) {
59 65 // coming from course page or url index page,
60 66 // the redirection is needed for completion tracking and logging

0 comments on commit fdb8574

Please sign in to comment.
Something went wrong with that request. Please try again.