I'm using freepbx on ubuntu 6.10 / apache / php5 and have a bug with ari :
When trying to listen a recording, if the crypted recording filename contains a plus (+), audio.php receives this crypted filename with a space instead of the "plus".
Example with url :
http://pabx/recordings/misc/audio.php?recording=Uj+dVmL0WqLs+MJE+vSFSLp6iZlI+mZhYBG40am7f+ZXonOoKDk3j8AB3TlwkKdPyfeCvPtNEzV9+VsJwWMesmUhs716C1PZXfrSE/+4sFTA1nEtQ2pKYEA8p/veDKZQ
$_GET['recording'] will be "Uj dVmL0WqLs MJE vSFSLp6iZlI mZhYBG40am7f ZXonOoKDk3j8AB3TlwkKdPyfeCvPtNEzV9 VsJwWMesmUhs716C1PZXfrSE/ 4sFTA1nEtQ2pKYEA8p/veDKZQ"
I tried to change apache and php codepage, installed php4, tried debian : same thing.
I've created a phpinfo.php file. When I call phpinfo.php?record=a+b, I always have:
$_GET['recording'] = "a b"
I was unable to know if this is a normal behavior or not.
I solved it using urlencode function in crypt.php :
function encrypt($str, $salt, $iv_len = 16) {
...
return urlencode(base64_encode($enc_text));
function decrypt($enc, $salt, $iv_len = 16) {
$enc = urldecode(base64_decode($enc));
...
No more problems then.