View Issue Details

IDProjectCategoryView StatusLast Update
0001184Main CAcert WebsiteGPG/PGPpublic2014-09-02 20:54
Reporterlp.algarvio Assigned ToBenBE  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformMain CAcert WebsiteOSN/AOS Versionstable
Product Version2013 Q2 
Target Version2014 Q1Fixed in Version2014 Q2 
Summary0001184: Hex2bin function
DescriptionIn newer versions of PHP, hex2bin function is already bundled.

a function_exists call needs to be added to check for the existence of such function (compatible with PHP4 and 5).
Additional InformationIn cacert/includes/general.php, line 500ish - change code to this:


if (!function_exists('hex2bin')) {
    function hex2bin($data)
    {
        while(strstr($data, "\\x"))
        {
            $pos = strlen($data) - strlen(strstr($data, "\\x"));
            $before = substr($data, 0, $pos);
            $char = chr(hexdec(substr($data, $pos + 2, 2)));
            $after = substr($data, $pos + 4);
            $data = $before.$char.$after;
        }
        return(utf8_decode($data));
    }
}
TagsNo tags attached.
Reviewed byNEOatNHNG, BenBE
Test Instructions

Relationships

related to 0000008 needs reviewSourcerer Normalization of special characters when comparing names 
related to 0000992 closedNEOatNHNG Problem with diacritic characters while adding PGP/GPG public key 
related to 0001260 needs workBenBE Make the source compatible with recent PHP versions 

Activities

BenBE

2013-07-03 17:23

updater   ~0004095

Unfortunately the hex2bin function in the code and the one defined by PHP do quite different things. Exchanging one for the other just won't work.

Also this function is only used in the PGP component thus a different approach can be used. Thus fixing this issue is most easily done as part of a planned rework in that section of the code.

BenBE

2014-03-19 11:09

updater   ~0004659

The offending function has been renamed as a quickfix to work around this issue while working on bug 1260. This fix could go online without further changes as it will be superseeded once the rework of the GnuPG issues has been completed.

NEOatNHNG

2014-03-21 01:21

administrator   ~0004666

Second review is OK.

Eva

2014-04-15 21:03

updater   ~0004721

Created PGP-key for

Ästörüx Xßéè (bug1184) <234.jan14@acme.com>

Added this key for signing into the account.
-> got key signed
Checked if the key was in the PGP-List
-> yes
Exported the key and checked if it was ok and contained the correct data and signature
-> yes

=> ok

INOPIAE

2014-04-15 21:30

updater   ~0004725

Created PGP-key for

Marcus Mängel

Added this key for signing into the account.
-> got key signed
Checked if the key was in the PGP-List
-> yes
Exported the key and checked if it was ok and contained the correct data and signature
-> yes

=> ok

INOPIAE

2014-04-15 21:30

updater   ~0004726

Two successful test. Please deploy

BenBE

2014-04-15 21:56

updater   ~0004730

Sent to Critical.

NEOatNHNG

2014-04-18 13:52

administrator   ~0004741

Fix applied on critical system on 2014-04-18 08:10:09

See https://lists.cacert.org/wws/arc/cacert-systemlog/2014-04/msg00007.html

Issue History

Date Modified Username Field Change
2013-07-02 03:07 lp.algarvio New Issue
2013-07-02 03:10 lp.algarvio Additional Information Updated
2013-07-03 17:23 BenBE Note Added: 0004095
2013-07-03 17:23 BenBE Assigned To => BenBE
2013-07-03 17:23 BenBE Status new => needs work
2013-07-03 17:23 BenBE Category => GPG/PGP
2013-07-03 17:27 BenBE Relationship added related to 0000008
2013-07-03 17:28 BenBE Relationship added related to 0000992
2014-03-19 10:59 BenBE Relationship added related to 0001260
2014-03-19 11:09 BenBE Reviewed by => BenBE
2014-03-19 11:09 BenBE Note Added: 0004659
2014-03-19 11:09 BenBE Status needs work => needs review & testing
2014-03-19 11:09 BenBE Target Version => 2014 Q1
2014-03-21 00:30 BenBE Source_changeset_attached => cacert-devel testserver-stable 75439b2e
2014-03-21 00:30 BenBE Source_changeset_attached => cacert-devel testserver-stable ea9f9d8d
2014-03-21 01:21 NEOatNHNG Reviewed by BenBE => NEOatNHNG, BenBE
2014-03-21 01:21 NEOatNHNG Note Added: 0004666
2014-03-21 01:21 NEOatNHNG Status needs review & testing => needs testing
2014-04-15 21:03 Eva Note Added: 0004721
2014-04-15 21:30 INOPIAE Note Added: 0004725
2014-04-15 21:30 INOPIAE Note Added: 0004726
2014-04-15 21:30 INOPIAE Status needs testing => ready to deploy
2014-04-15 21:56 BenBE Note Added: 0004730
2014-04-15 22:00 BenBE Source_changeset_attached => cacert-devel release 0ea06919
2014-04-18 13:52 NEOatNHNG Note Added: 0004741
2014-04-18 13:52 NEOatNHNG Status ready to deploy => solved?
2014-04-18 13:52 NEOatNHNG Fixed in Version => 2014 Q2
2014-04-18 13:52 NEOatNHNG Resolution open => fixed
2014-09-02 20:54 INOPIAE Status solved? => closed