Changeset 5495 in subversion
- Timestamp:
- Nov 27, 2011 5:10:40 AM (18 months ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/main.inc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r5494 r5495 2 2 =========================== 3 3 4 - Fix handling of invalid characters in request (#1488124) 4 5 - Fix merging some configuration options in update.sh script (#1485864) 5 6 - Fix so TEXT key will remove all HEADER keys in IMAP SEARCH (#1488208) -
trunk/roundcubemail/program/include/main.inc
r5490 r5495 641 641 { 642 642 $value = NULL; 643 644 if ($source==RCUBE_INPUT_GET && isset($_GET[$fname])) 645 $value = $_GET[$fname]; 646 else if ($source==RCUBE_INPUT_POST && isset($_POST[$fname])) 647 $value = $_POST[$fname]; 648 else if ($source==RCUBE_INPUT_GPC) 649 { 643 644 if ($source == RCUBE_INPUT_GET) { 645 if (isset($_GET[$fname])) 646 $value = $_GET[$fname]; 647 } 648 else if ($source == RCUBE_INPUT_POST) { 649 if (isset($_POST[$fname])) 650 $value = $_POST[$fname]; 651 } 652 else if ($source == RCUBE_INPUT_GPC) { 650 653 if (isset($_POST[$fname])) 651 654 $value = $_POST[$fname]; … … 654 657 else if (isset($_COOKIE[$fname])) 655 658 $value = $_COOKIE[$fname]; 656 }659 } 657 660 658 661 return parse_input_value($value, $allow_html, $charset); … … 662 665 * Parse/validate input value. See get_input_value() 663 666 * Performs stripslashes() and charset conversion if necessary 664 * 667 * 665 668 * @param string Input value 666 669 * @param boolean Allow HTML tags in field value … … 688 691 $value = stripslashes($value); 689 692 690 // remove HTML tags if not allowed 693 // remove HTML tags if not allowed 691 694 if (!$allow_html) 692 695 $value = strip_tags($value); 693 696 697 $output_charset = is_object($OUTPUT) ? $OUTPUT->get_charset() : null; 698 699 // remove invalid characters (#1488124) 700 if ($output_charset == 'UTF-8') 701 $value = rc_utf8_clean($value); 702 694 703 // convert to internal charset 695 if ( is_object($OUTPUT) && $charset)696 return rcube_charset_convert($value, $OUTPUT->get_charset(), $charset);697 else 698 return $value;704 if ($charset && $output_charset) 705 $value = rcube_charset_convert($value, $output_charset, $charset); 706 707 return $value; 699 708 } 700 709 … … 712 721 foreach ($src as $key => $value) { 713 722 $fname = $key[0] == '_' ? substr($key, 1) : $key; 714 if ($ignore && !preg_match( "/($ignore)/", $fname))723 if ($ignore && !preg_match('/^(' . $ignore . ')$/', $fname)) 715 724 $out[$fname] = get_input_value($key, $mode); 716 725 } 717 726 718 727 return $out; 719 728 }
Note: See TracChangeset
for help on using the changeset viewer.
