rpms/squirrelmail/F-10 squirrelmail-1.4.17-biguid.patch,NONE,1.1
Michal Hlavinka
mhlavink at fedoraproject.org
Tue May 12 08:28:14 UTC 2009
Author: mhlavink
Update of /cvs/extras/rpms/squirrelmail/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16422
Added Files:
squirrelmail-1.4.17-biguid.patch
Log Message:
add biguid patch for working with 32bit UL X-UID values with 32-bit version of php
squirrelmail-1.4.17-biguid.patch:
--- NEW FILE squirrelmail-1.4.17-biguid.patch ---
diff -up squirrelmail/functions/global.php.biguid squirrelmail/functions/global.php
--- squirrelmail/functions/global.php.biguid 2009-01-22 11:35:17.000000000 +0100
+++ squirrelmail/functions/global.php 2009-01-23 12:12:31.570024148 +0100
@@ -520,3 +520,16 @@ function is_ssl_secured_connection()
return FALSE;
}
+/**
+ * Restrict value to be numeric string
+ *
+ * @param string $value The value to be checked
+ *
+ * @return $value if it is numeric string, "0" otherwise
+ *
+ * @since 1.4.18
+ */
+function sqrestrict_to_num($value)
+{
+ return preg_match('/^[0-9]+$/', $value) ? $value : '0';
+}
diff -up squirrelmail/functions/imap_messages.php.biguid squirrelmail/functions/imap_messages.php
--- squirrelmail/functions/imap_messages.php.biguid 2009-01-22 11:35:17.000000000 +0100
+++ squirrelmail/functions/imap_messages.php 2009-01-23 12:11:13.912875541 +0100
@@ -1006,7 +1006,7 @@ function sqimap_get_message($imap_stream
global $uid_support;
// typecast to int to prohibit 1:* msgs sets
- $id = (int) $id;
+ $id = sqrestrict_to_num($id);
$flags = array();
$read = sqimap_run_command($imap_stream, "FETCH $id (FLAGS BODYSTRUCTURE)", true, $response, $message, $uid_support);
if ($read) {
diff -up squirrelmail/plugins/delete_move_next/setup.php.biguid squirrelmail/plugins/delete_move_next/setup.php
--- squirrelmail/plugins/delete_move_next/setup.php.biguid 2009-01-22 11:35:10.000000000 +0100
+++ squirrelmail/plugins/delete_move_next/setup.php 2009-01-23 12:11:13.913875492 +0100
@@ -166,11 +166,11 @@ function delete_move_next_read($currloc)
$prev_if_del = $prev;
$next_if_del = $next;
if (!$uid_support && ($auto_expunge || $move_to_trash)) {
- if ($prev_if_del > $passed_id) {
- $prev_if_del--;
+ if (((float)$prev_if_del) > ((float)$passed_id)) {
+ $prev_if_del = (string) (((float)$prev_if_del) -1);
}
- if ($next_if_del > $passed_id) {
- $next_if_del--;
+ if (((float)$next_if_del) > ((float)$passed_id)) {
+ $next_if_del = (string) (((float)$next_if_del) -1);
}
}
@@ -181,31 +181,31 @@ function delete_move_next_read($currloc)
'<tr>'.
"<td bgcolor=\"$color[9]\" width=\"100%\" align=\"center\"><small>";
- if ($prev > 0){
+ if (((float)$prev) > 0){
echo "<a href=\"read_body.php?passed_id=$prev_if_del&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage&show_more=0&delete_id=$passed_id\">" . _("Delete & Prev") . "</a>" . " | \n";
}
else {
echo _("Delete & Prev") . " | ";
}
- if ($next > 0){
+ if (((float)$next) > 0){
echo "<a href=\"read_body.php?passed_id=$next_if_del&mailbox=$urlMailbox&sort=$sort&startMessage=$startMessage&show_more=0&delete_id=$passed_id\">" . _("Delete & Next") . "</a>\n";
} else {
echo _("Delete & Next");
}
echo '</small></td></tr>';
- if ($next_if_del < 0) {
+ if (((float)$next_if_del) < 0) {
$next_if_del = $prev_if_del;
}
if (($delete_move_next_formATtop == 'on') && ($currloc == 'top')) {
- if ($next_if_del > 0) {
+ if (((float)$next_if_del) > 0) {
delete_move_next_moveNextForm($next_if_del);
} else {
delete_move_next_moveRightMainForm();
}
}
if (($delete_move_next_formATbottom != 'off') && ($currloc == 'bottom')) {
- if ($next_if_del > 0) {
+ if (((float)$next_if_del) > 0) {
delete_move_next_moveNextForm($next_if_del);
} else {
delete_move_next_moveRightMainForm();
diff -up squirrelmail/src/compose.php.biguid squirrelmail/src/compose.php
--- squirrelmail/src/compose.php.biguid 2009-01-22 11:35:13.000000000 +0100
+++ squirrelmail/src/compose.php 2009-01-23 12:11:13.913875492 +0100
@@ -92,7 +92,7 @@ sqgetGlobalVar('ent_num',$ent_num, $SQ_G
sqgetGlobalVar('saved_draft',$saved_draft, SQ_FORM);
if ( sqgetGlobalVar('delete_draft',$delete_draft) ) {
- $delete_draft = (int)$delete_draft;
+ $delete_draft = sqrestrict_to_num($delete_draft);
}
if ( sqgetGlobalVar('startMessage',$startMessage) ) {
diff -up squirrelmail/src/download.php.biguid squirrelmail/src/download.php
--- squirrelmail/src/download.php.biguid 2009-01-22 11:35:13.000000000 +0100
+++ squirrelmail/src/download.php 2009-01-23 12:11:13.914875446 +0100
@@ -38,7 +38,7 @@ sqgetGlobalVar('mailbox', $mailbox,
sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
sqgetGlobalVar('absolute_dl',$absolute_dl, SQ_GET);
if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
- $passed_id = (int) $temp;
+ $passed_id = sqrestrict_to_num($temp);
}
global $default_charset;
diff -up squirrelmail/src/image.php.biguid squirrelmail/src/image.php
--- squirrelmail/src/image.php.biguid 2009-01-22 11:35:13.000000000 +0100
+++ squirrelmail/src/image.php 2009-01-23 12:11:13.914875446 +0100
@@ -32,7 +32,7 @@ displayPageHeader($color, 'None');
/* globals */
if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
- $passed_id = (int) $temp;
+ $passed_id = sqrestrict_to_num($temp);
}
sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
sqgetGlobalVar('ent_id', $ent_id, SQ_GET);
diff -up squirrelmail/src/printer_friendly_main.php.biguid squirrelmail/src/printer_friendly_main.php
--- squirrelmail/src/printer_friendly_main.php.biguid 2009-01-22 11:35:13.000000000 +0100
+++ squirrelmail/src/printer_friendly_main.php 2009-01-23 12:11:13.914875446 +0100
@@ -29,7 +29,7 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox
! sqgetGlobalVar('passed_id',$passed_id,SQ_GET)) {
error_box(_("Invalid URL"),$color);
} else {
- $passed_id= (int) $passed_id;
+ $passed_id= sqrestrict_to_num($passed_id);
$view_unsafe_images = (bool) $_GET['view_unsafe_images'];
/* end globals */
displayHtmlHeader( _("Printer Friendly"), '', false, true );
diff -up squirrelmail/src/read_body.php.biguid squirrelmail/src/read_body.php
--- squirrelmail/src/read_body.php.biguid 2009-01-22 11:35:13.000000000 +0100
+++ squirrelmail/src/read_body.php 2009-01-23 12:11:13.915796109 +0100
@@ -750,7 +750,7 @@ sqgetGlobalVar('passed_ent_id', $passed_
sqgetGlobalVar('mailbox', $mailbox);
if ( sqgetGlobalVar('passed_id', $temp) ) {
- $passed_id = (int) $temp;
+ $passed_id = sqrestrict_to_num($temp);
}
if ( sqgetGlobalVar('sort', $temp) ) {
$sort = (int) $temp;
diff -up squirrelmail/src/view_header.php.biguid squirrelmail/src/view_header.php
--- squirrelmail/src/view_header.php.biguid 2009-01-22 11:35:13.000000000 +0100
+++ squirrelmail/src/view_header.php 2009-01-23 12:11:13.915796109 +0100
@@ -119,7 +119,7 @@ function view_header($header, $mailbox,
/* get global vars */
if ( sqgetGlobalVar('passed_id', $temp, SQ_GET) ) {
- $passed_id = (int) $temp;
+ $passed_id = sqrestrict_to_num($temp);
}
if ( sqgetGlobalVar('mailbox', $temp, SQ_GET) ) {
$mailbox = $temp;
More information about the fedora-extras-commits
mailing list