MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

bug report - linefeeds and PGP encrypted mv_credit_card_info



I am wondering if others are having this problem - or if it's 
unique to my shop - I've had it will all recent versions of minivend
(3.09 to 3.14).

The mv_credit_card_info after PGP encryption contains multiple lines
- on unix lines are separated by CR NL pairs.

This is OK in the session database, but when stored in the userdb
the NL are lost.

I think this only becomes a problem after the userdata expires in the
session database - or a new session started, and the userdb data
is read back from the userdb database.

I have'nt worked out all the details on this, but the workaround
seems to be tricky if the older order report 'report.html' is  used -
(due to the variable substitution on order variables - anything
starting with a dollar)

I am using a global sub to change CR without following NL to
CR NL pairs, i.e. in report.html

[if value mv_credit_card_info]                                                  
[tag mime type application/pgp-encrypted][/tag]                                 
[tag mime Credit Card Information]                                              
Credit Card Information                                                         
[perl arg="sub" interpolate=1]                                                  
    display_cinfo(q^[value mv_credit_card_info]^);                              
[/perl]                                                                         
[/tag]                                                                          
[/if]                                                           

where display_cinfo is a global sub:
GlobalSub <<EOF
sub display_cinfo {
        my($cinfo) = @_;
        $cinfo =~ s/\r([^\n])/\r\n$1/g;
        $cinfo =~ s/\r([^\n])/\r\n$1/g;
        return $cinfo;
}
EOF

Brian.



Search for: Match: Format: Sort by: