cosyxu wrote: ↑Mon Nov 19, 2018 5:57 pm
Good morning Amo,
I am using ProcessMaker 3.2.2, I was wondering is it possible to generate the following link in a PHP trigger? Or can I get it from any table in the database?
This link is from ABE function.
Code: Select allhttps://localhost/syscos/en/neoclassic/services/ActionsByEmail?ACTION=o9Wfz5Xmp3Gysdasd&APP_UID=Z5ZhomSjamKlqZPTp2ppqGLRZZZoommjZGigpmmmqms&DEL_INDEX=Zg&FIELD=ptig0asdasdsa5nLd5aeo6JY&VALUE=dtKe0pnloVDd7asdasd5me5A&ABER=aJNpoGKsbWsdadadTp2ppqGSmbJljo2GjaWepp2Ggp2k
Thanks,
Yuan
I finally figured this out. You totally screwed me up by corrupting the URL. When I tried to decrypt your URL in ProcessMaker, it threw an error and I couldn't figure out why. I finally figured out that you purposely changed the encrypted characters, which was causing the errors when decrypting. You really are paranoid.
OK, create a trigger like this:
Code: Select all$g = new \G();
print "<pre>Original URL:\n".
"https://localhost/syscos/en/neoclassic/services/ActionsByEmail?ACTION=o9Wfz5Xmp3Gysdasd&APP_UID=Z5ZhomSjamKlqZPTp2ppqGLRZZZoommjZGigpmmmqms&DEL_INDEX=Zg&FIELD=ptig0asdasdsa5nLd5aeo6JY&VALUE=dtKe0pnloVDd7asdasd5me5A&ABER=aJNpoGKsbWsdadadTp2ppqGSmbJljo2GjaWepp2Ggp2k\n\n";
print "Decrypted URL:\nhttps://localhost/syscos/en/neoclassic/services/ActionsByEmail".
"?ACTION=".$g->decrypt(urldecode(utf8_encode("o9Wfz5Xmp3Gysdasd")), URL_KEY).
"&APP_UID=".$g->decrypt(urldecode(utf8_encode("Z5ZhomSjamKlqZPTp2ppqGLRZZZoommjZGigpmmmqms")), URL_KEY).
"&DEL_INDEX=".$g->decrypt(urldecode(utf8_encode("Zg")), URL_KEY).
"&FIELD=".$g->decrypt(urldecode(utf8_encode("ptig0asdasdsa5nLd5aeo6JY")), URL_KEY).
"&VALUE=".$g->decrypt(urldecode(utf8_encode("dtKe0pnloVDd7asdasd5me5A")), URL_KEY).
"&ABER=".$g->decrypt(urldecode(utf8_encode("aJNpoGKsbWsdadadTp2ppqGSmbJljo2GjaWepp2Ggp2k")), URL_KEY);
die;
This will show you the decrypted values in the URL. You will have to change the strings to match your URL to see the original values.
Once you know the original values, then you can construct the URL like this:
Code: Select all$encryptedUrl = "https://localhost/syscos/en/neoclassic/services/ActionsByEmail".
"?ACTION=".$g->encrypt("processABE", URL_KEY).
"&APP_UID=".$g->encrypt($caseId, URL_KEY).
"&DEL_INDEX=".$g->encrypt($index, URL_KEY).
"&FIELD=".$g->encrypt($fieldId, URL_KEY).
"&VALUE=".$g->encrypt($fieldValue, URL_KEY).
"&ABER=".$g->encrypt($abeResponse, URL_KEY);
//Execute the URL:
header("location: $encryptedUrl");