Skip to content

Commit

Permalink
Escape group title and description in migration process - refs CT#7909
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Oct 21, 2015
1 parent 2776c37 commit 0caae06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/install/install.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2350,6 +2350,8 @@ function fixIds(EntityManager $em)

if (!empty($groups )) {
foreach ($groups as $group) {
$group['description'] = Database::escape_string($group['description']);
$group['name'] = Database::escape_string($group['name']);
$sql = "INSERT INTO usergroup (name, group_type, description, picture, url, visibility, updated_at, created_at)
VALUES ('{$group['name']}', '1', '{$group['description']}', '{$group['picture_uri']}', '{$group['url']}', '{$group['visibility']}', '{$group['updated_on']}', '{$group['created_on']}')";

Expand Down

0 comments on commit 0caae06

Please sign in to comment.