[CK-Ledger-users] Re: [Phpgroupware-developers] Testing CK-Ledger v.0.7.1 against phpgroupware-0.9.
Status: Beta
Brought to you by:
ckwu
|
From: Dave H. <dav...@mb...> - 2003-09-17 05:19:26
|
Hey CK=2C C=3D20K=3D20Wu =3Cchiukay2000=40yahoo=2Ecom=2Ehk=3E wrote=3A =3E Hello=2C Dave=2C =3E = =3E I think I=27ve found what=27s going on=2E =3E = =3E With 0=2E9=2E14=2E006=2C =3E = =3E =2E=2E/phpgwapi/inc/class=2Esessions=5Fphp4=2Einc=2Ephp (line 951) =3E and =2E=2E/phpgwapi/inc/class=2Esessions=5Fdb=2Einc=2Ephp (line =3E 977) read=2C =3E = =3E =24new=5Fextravars =2E=3D =22=24key=3D=24value=22 =3B =3E = =3E With 0=2E9=2E16RC1=2C =3E = =3E =2E=2E/phpgwapi/inc/class=2Esessions=2Einc=2Ephp (line 1194) =3E reads=2C =3E = =3E =24new=5Fextravars =2E=3D =24key=2E=27=3D=27=2Eurlencode(=24value) =3B= =3E = =3E So=2C apparently=2C with earlier versions=2C it is the =3E application script=27s responsibility to url=5Fencode GET =3E variables before sending it on=2E However=2C with =3E 0=2E9=2E16RC1=2C the sessions facility handles the =3E url=5Fencode-ing when it receives the GET variables from =3E the application script=2E =3E = =3E With CK-Ledger v=2E0=2E7=2E1 running against phpgw =3E 0=2E9=2E16RC1=2C it means double url=5Fencoding and therefore =3E the callee scripts need to url=5Fdecode the GET variable =3E one more time to recover the correct value=2E =3E = =3E I think this will break a lot of the addon module =3E codes=2E However=2C if the GET variable passed contains =3E pure alphanumeric chars=2C no error will be detected=2C =3E since urlencode/urldecode in these cases do not alter =3E the GET variables=2E So=2C there may be quite a fair bit =3E of spurious 0=2E9=2E16RC1 errors being the result of the =3E above=2E Ok=2C now I follow what is going on=2E I didn=27t make this change=2C bu= t I can understand (and agree with) the logic behind it=2E This is my logic with= it=2C others may disaagree=2C it is easier to url=5Fencode the variables=2C= once in the api=2C than each app maintainer having to remember to encode them=2E= It also means that if we ever have to do anything else to the GET args it can be changed once in the API and all apps automatically get the benefit=2E I understand this will cause some problems with CK Ledger=2C this is unfortunate=2C but I doubt the change will be backed out=2E As will all = new versions of the API there are changes=2E The 16 API has quite a few changes=2C some of which I think you app could benefit from=2E = I would suggest that you continue testing with the 16RCs with regular CVS updates=2C and keep in touch with us=2E I am willing to assist you g= et your app to run properly on 16=2E Please be aware that I do not use CK Ledger=2C but am happy to answer any questions you may have=2E Cheers Dave =3E = =3E Cheers=2C =3E CK =3E = =3E = =3E = =3E Dave Hall=3A =3E = =3E =3ECK Wu =3Cchiukay2000=40yahoo=2Ecom=2Ehk=3E wrote=3A =3E =3E =3E =3E=3EHello=2C folks=2C =3E =3E=3E =3E =3E=3EWhile testing CK-Ledger v=2E0=2E7=2E1 against =3E =3E=3Ephpgroupware-0=2E9=2E16=2ERC1=2C =3E =3E=3EI came across the following=2C =3E =3E=3E =3E =3E=3EWhen calling=2C =3E =3E=3E =3E =3E=3E =3E =3Ehttp=3A//localhost/=2E=2E=2E/loglist=2Ephp=3Ffilter=3D=252BWHERE=252B1= =25253D1=252B=26sessionid=3D=2E=2E=2E=26kp3=3D=2E=2E=2E=26domain=3Ddefaul= t=26click=5Fhistory=3D=2E=2E=2E =3E =3E =3E =3EIs this =3E =3Ehttp=3A//localhost/phpgroupware/loglist=2Ephp=3Ffilter=3D=252BWHERE=25= 2B1=25253D1=252B=26=2E=2E=2E =3E =3E =3E =3Eor =3E =3E =3E =3Ehttp=3A//localhost/ck- =3E ledger/loglist=2Ephp=3Ffilter=3D=252BWHERE=252B1=25253D1=252B=26=2E=2E= =2E=3E =3E =3ELooking at that code =2E=2E=2E there are several problems =3E =2E=2E=2E=2E =3E =3E =3E =3Efirstly the =24=5FPOST/=24=5FGET hack won=27t work with =3E register=5Fglobals =3D off =3E =3E =3E =3EAlso phpgroupware has never processed the external =3E variables=2C I think it =3E =3Eis a PHP problem=2E IIRC php will url=5Fdecode all =24=5FGET =3E vars for you=2E =3E =3E =3E =3EBit more info about where this code is will probably =3E help us track this =3E =3Edown=2E =3E =3E =3E =3ECheers =3E =3E =3E =3EDave =3E =3E =3E = =3E = =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F =3E =B3=CC=B7s=B9a=C1n=B1=C0=A4=B6=3A=B9J=A8=A3=A1A=B6=C3=A5=40=A8=CE=A4H= =A1A=B0=B2=A6p=B7R=A6=B3=A4=D1=B7N=2E=2E=2E =3E http=3A//ringtone=2Eyahoo=2Ecom=2Ehk =3E = =3E |