Skip to Content.
Sympa Menu

cacert-devel - Re: Patch Request Bug #569 - Follow Up Patch

Subject: CAcert Code Development list.

List archive

Re: Patch Request Bug #569 - Follow Up Patch


Chronological Thread 
  • From: Wytze van der Raay <wytze AT cacert.org>
  • To: Benny Baumann <benbe AT cacert.org>
  • Cc: "critical-admin AT cacert.org" <critical-admin AT cacert.org>, cacert-devel AT lists.cacert.org, Michael Tänzer <michael.taenzer AT cacert.org>, Marcus Mängel <inopiae AT cacert.org>, Martin Gummi <martin.gummi AT cacert.org>
  • Subject: Re: Patch Request Bug #569 - Follow Up Patch
  • Date: Thu, 17 Oct 2013 18:02:07 +0200
  • Organization: CAcert

Hi Benny,

On 16.10.2013 17:56, Benny Baumann wrote:
> it's been some time since we first submitted a fix for Bug 569 and there
> were still some issues left. Thus here's a minor tweak for the initially
> submitted patch. In order for this to apply propely make sure the
> initial patch for bug 569 has been applied and proceed with this one
> afterwards.

I'm sorry, but this is not really workable for us. The initial patch which
you provided on 13.05.2013 is no longer valid against the current state of
the production code -- it produces a lot of mismatches (see attached log).
So please provide a new version of that, which can be applied cleanly against
the current production code -- in the process you migth as well roll in the
little "v2patch". We don't mind patches on patches, but they should be valid
against the current code -- sorting out what is still relevant and what
isn't, should *not* be done on the production server.

> Thanks got to NEOatNHNG (Michael Tänzer) and BenBE (me) for review as
> well as Eva, INOPIAE (Marcus Mängel) and magu (Martin Gummi) for testing
> of these adjustments.

Regards,
-- wytze
Script started on Thu 17 Oct 2013 05:57:55 PM CEST
wytze@webdb:/tmp/try$ patch --ignore-whitespace <bug-569.patch
patching file account.php
Hunk #2 succeeded at 82 (offset -1 lines).
Hunk #3 succeeded at 151 (offset -1 lines).
Hunk #4 FAILED at 163.
Hunk #5 FAILED at 171.
Hunk #6 succeeded at 171 (offset -11 lines).
Hunk #7 FAILED at 316.
Hunk #8 succeeded at 353 (offset 5 lines).
Hunk #9 succeeded at 362 (offset 5 lines).
Hunk #10 succeeded at 421 (offset 5 lines).
Hunk #11 succeeded at 582 (offset 6 lines).
Hunk #12 FAILED at 623.
Hunk #13 FAILED at 642.
Hunk #14 succeeded at 659 (offset -8 lines).
Hunk #15 succeeded at 673 with fuzz 2 (offset -2 lines).
Hunk #16 succeeded at 718 (offset -2 lines).
Hunk #17 succeeded at 727 (offset -2 lines).
Hunk #18 FAILED at 773.
Hunk #19 succeeded at 847 with fuzz 1 (offset 2 lines).
Hunk #20 succeeded at 949 (offset 3 lines).
Hunk #21 succeeded at 980 (offset 3 lines).
Hunk #22 succeeded at 1033 (offset 21 lines).
Hunk #23 succeeded at 1041 (offset 21 lines).
Hunk #24 succeeded at 1107 (offset 22 lines).
Hunk #25 succeeded at 1136 (offset 22 lines).
Hunk #26 succeeded at 1272 (offset 43 lines).
Hunk #27 succeeded at 1324 (offset 43 lines).
Hunk #28 succeeded at 1535 (offset 57 lines).
Hunk #29 succeeded at 1567 (offset 58 lines).
Hunk #30 succeeded at 1576 (offset 58 lines).
Hunk #31 succeeded at 1626 (offset 58 lines).
Hunk #32 succeeded at 1684 with fuzz 1 (offset 59 lines).
Hunk #33 succeeded at 1823 (offset 78 lines).
Hunk #34 succeeded at 1838 with fuzz 2 (offset 84 lines).
Hunk #35 succeeded at 1888 (offset 84 lines).
Hunk #36 succeeded at 1896 (offset 84 lines).
Hunk #37 succeeded at 1945 (offset 84 lines).
Hunk #38 succeeded at 1964 (offset 84 lines).
Hunk #39 succeeded at 1973 with fuzz 2 (offset 85 lines).
Hunk #40 succeeded at 2032 with fuzz 2 (offset 86 lines).
Hunk #41 succeeded at 2287 (offset 105 lines).
Hunk #42 succeeded at 2295 (offset 105 lines).
Hunk #43 succeeded at 2339 (offset 105 lines).
Hunk #44 succeeded at 2351 (offset 105 lines).
Hunk #45 succeeded at 2431 (offset 105 lines).
Hunk #46 succeeded at 2566 (offset 105 lines).
Hunk #47 succeeded at 2790 (offset 112 lines).
Hunk #48 succeeded at 2799 (offset 112 lines).
Hunk #49 succeeded at 2863 (offset 112 lines).
Hunk #50 succeeded at 3104 (offset 128 lines).
Hunk #51 succeeded at 3125 (offset 128 lines).
6 out of 51 hunks FAILED -- saving rejects to file account.php.rej
patching file wot.php
Hunk #1 FAILED at 263.
1 out of 1 hunk FAILED -- saving rejects to file wot.php.rej
wytze@webdb:/tmp/try$ cat wot.php.rej
--- wot.php
+++ wot.php
@@ -263,7 +263,7 @@
exit;
}

- if($_REQUEST['points'] == "")
+ if($_REQUEST['points'] == "" ||
!is_numeric($_REQUEST['points']))
{
show_page("VerifyData","",_("You must enter the
number of points you wish to allocate to this person."));
exit;
wytze@webdb:/tmp/try$ cat account.php.rej
--- account.php
+++ account.php
@@ -163,7 +166,7 @@
{
$row = mysql_fetch_assoc($res);
echo $row['email']."<br>\n";
- $query = "select `emailcerts`.`id`
+ $query = "select `emailcerts`.`id`
from
`emaillink`,`emailcerts` where
`emailid`='$id' and
`emaillink`.`emailcertsid`=`emailcerts`.`id` and
`revoked`=0 and
UNIX_TIMESTAMP(`expire`)-UNIX_TIMESTAMP() > 0
@@ -171,7 +174,7 @@
$dres = mysql_query($query);
while($drow =
mysql_fetch_assoc($dres))
mysql_query("update
`emailcerts` set `revoked`='1970-01-01 10:00:01' where
`id`='".$drow['id']."'");
-
+
$query = "update `email` set
`deleted`=NOW() where `id`='$id'";
mysql_query($query);
$delcount++;
@@ -316,9 +317,9 @@
showfooter();
exit;
}
-
+
$query = "insert into emailcerts set
- `CN`='$defaultemail',
+ `CN`='$defaultemail',
`keytype`='NS',

`memid`='".intval($_SESSION['profile']['id'])."',

`created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
@@ -623,7 +624,7 @@
{
$row = mysql_fetch_assoc($res);
echo $row['domain']."<br>\n";
-
+
$dres = mysql_query(
"select distinct
`domaincerts`.`id`
from `domaincerts`,
`domlink`
@@ -642,7 +643,7 @@
and
UNIX_TIMESTAMP(`expire`) -

UNIX_TIMESTAMP() > 0");
}
-
+
mysql_query(
"update `domains`
set `deleted`=NOW()
@@ -773,13 +774,13 @@

if(array_key_exists('0',$_SESSION['_config']['rowid']) &&
$_SESSION['_config']['rowid']['0'] > 0)
{
- $query = "insert into `domaincerts` set
+ $query = "insert into `domaincerts` set

`CN`='".mysql_real_escape_string($_SESSION['_config']['rows']['0'])."',

`domid`='".mysql_real_escape_string($_SESSION['_config']['rowid']['0'])."',

`created`=NOW(),`subject`='".mysql_real_escape_string($subject)."',

`rootcert`='".mysql_real_escape_string($_SESSION['_config']['rootcert'])."'";
} elseif(array_key_exists('0',$_SESSION['_config']['altid'])
&& $_SESSION['_config']['altid']['0'] > 0) {
- $query = "insert into `domaincerts` set
+ $query = "insert into `domaincerts` set

`CN`='".mysql_real_escape_string($_SESSION['_config']['altrows']['0'])."',

`domid`='".mysql_real_escape_string($_SESSION['_config']['altid']['0'])."',

`created`=NOW(),`subject`='".mysql_real_escape_string($subject)."',
wytze@webdb:/tmp/try$ exit
exit

Script done on Thu 17 Oct 2013 05:58:39 PM CEST

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.18.

Top of Page