Browse files

MDL-4313 LDAP doesn't properly escape extra quotes in course details;…

… backported from MOODLE_18_STABLE
  • Loading branch information...
1 parent 4e3ee63 commit f035daedcaac3cc5e063f6c3486f9da644a1b115 skodak committed Mar 29, 2007
Showing with 3 additions and 3 deletions.
  1. +3 −3 enrol/ldap/enrol.php
View
6 enrol/ldap/enrol.php
@@ -585,8 +585,8 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
// override with required ext data
$course->idnumber = $course_ext[$CFG->enrol_ldap_course_idnumber][0];
- $course->fullname = $course_ext[$CFG->enrol_ldap_course_fullname][0];
- $course->shortname = $course_ext[$CFG->enrol_ldap_course_shortname][0];
+ $course->fullname = addslashes($course_ext[$CFG->enrol_ldap_course_fullname][0]);
+ $course->shortname = addslashes($course_ext[$CFG->enrol_ldap_course_shortname][0]);
if ( empty($course->idnumber)
|| empty($course->fullname)
|| empty($course->shortname) ) {
@@ -597,7 +597,7 @@ function create_course ($course_ext,$skip_fix_course_sortorder=0){
}
if(!empty($CFG->enrol_ldap_course_summary)){ // optional
- $course->summary = $course_ext[$CFG->enrol_ldap_course_summary][0];
+ $course->summary = addslashes($course_ext[$CFG->enrol_ldap_course_summary][0]);
}
if(!empty($CFG->enrol_ldap_category)){ // optional ... but ensure it is set!
$course->category = $CFG->enrol_ldap_category;

0 comments on commit f035dae

Please sign in to comment.