Changeset 515 in subversion for trunk/roundcubemail/program/include/main.inc
- Timestamp:
- Mar 21, 2007 5:56:49 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/main.inc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r510 r515 581 581 (created, last_login, username, mail_host, alias, language) 582 582 VALUES (".$DB->now().", ".$DB->now().", ?, ?, ?, ?)", 583 $user,584 $host,585 $user_email,586 $_SESSION['user_lang']);583 strip_newlines($user), 584 strip_newlines($host), 585 strip_newlines($user_email), 586 $_SESSION['user_lang']); 587 587 588 588 if ($user_id = $DB->insert_id(get_sequence_name('users'))) … … 596 596 597 597 // try to resolve the e-mail address from the virtuser table 598 if (!empty($CONFIG['virtuser_query']) &&598 if (!empty($CONFIG['virtuser_query']) && 599 599 ($sql_result = $DB->query(preg_replace('/%u/', $user, $CONFIG['virtuser_query']))) && 600 600 ($DB->num_rows()>0)) … … 605 605 VALUES (?, 0, 1, ?, ?)", 606 606 $user_id, 607 $user_name,607 strip_newlines($user_name), 608 608 preg_replace('/^@/', $user . '@', $sql_arr[0])); 609 609 } … … 615 615 VALUES (?, 0, 1, ?, ?)", 616 616 $user_id, 617 $user_name,618 $user_email);617 strip_newlines($user_name), 618 strip_newlines($user_email)); 619 619 } 620 620 … … 1139 1139 { 1140 1140 return preg_replace('/[\'"]/', '', $str); 1141 } 1142 1143 /** 1144 * Remove new lines characters from given string 1145 */ 1146 function strip_newlines($str) 1147 { 1148 return preg_replace('/[\r\n]/', '', $str); 1141 1149 } 1142 1150
Note: See TracChangeset
for help on using the changeset viewer.
