-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.2
-
Security Level: Jimmy
-
None
when implementing a custom URLEncoder it is possible to append a custom URL parameter e.g. (customparam=aaa) to the encoded URL which works fine in most cases:
e.g.
zk.ajaxURI('/somepath?param=123')
will correctly lead to
/application/somepath?customparam=aaa¶m=123"
or resources are loaded correctly using this parameter
http://server:8080/application/zkau/web/c714a283/zul/css/zk.wcs?customparam=aaa
in case of file upload additional URL parameters are appended to the URL after the call to zk.ajaxURI leading to an erroneous URL causing an error in fileupload
http://server:8080/zksupport7/zkau/upload?customparam=aaa?uuid=aR6Q2&dtid=z_m0v&sid=0&maxsize=undefined
(contains 2 question marks '?')
this can be fixed in js/zul/Upload.js line 42
instead of appending the params at the end
action = zk.ajaxURI('/upload',
{desktop:dt,au:true}) + '?uuid=' + wgt.uuid + '&dtid=' + dt.id + '&sid=' + upload.sid
+ (upload.maxsize !== '' ? '&maxsize=' + upload.maxsize : '')
+ (upload.isNative ? '&native=true' : ''),
they can be added before calling zk.ajaxURI
action = zk.ajaxURI('/upload' + '?uuid=' + wgt.uuid + '&dtid=' + dt.id + '&sid=' + upload.sid
+ (upload.maxsize !== '' ? '&maxsize=' + upload.maxsize : '')
+ (upload.isNative ? '&native=true' : ''),
),