diff --git a/modules/InfoCard/www/STS_card_issuer.php b/modules/InfoCard/www/STS_card_issuer.php index ca25933792645e2de2f1045c5d9f6b59c119deca..8847f5bdb9d3d375e840204ab486be3e402d10ce 100755 --- a/modules/InfoCard/www/STS_card_issuer.php +++ b/modules/InfoCard/www/STS_card_issuer.php @@ -126,7 +126,7 @@ function enable_download($username, $cardid){ $time = 'x'.time(); //Cannot start with a number $uuid = uniqid(); - $handle = fopen("/tmp/$uuid",'w'); + $handle = fopen(SimpleSAML_Utilities::getTempDir() . "/$uuid",'w'); if ($handle) { fwrite($handle, strlen($username).$username.strlen($cardid).$cardid.strlen($time).$time); fclose ($handle); @@ -152,7 +152,7 @@ function disable_download($uuid){ */ function is_card_enabled($uuid, $delivery_time){ $now = time(); - $filename = "/tmp/$uuid"; + $filename = SimpleSAML_Utilities::getTempDir() . "/$uuid"; //File check if (!file_exists($filename)) return false; //File doesn't exist diff --git a/modules/InfoCard/www/prueba.php b/modules/InfoCard/www/prueba.php index 8376b34d0bc47f140f00ab1a78152485b06e781b..34b8d27d416b554d0420002289254aa056120024 100755 --- a/modules/InfoCard/www/prueba.php +++ b/modules/InfoCard/www/prueba.php @@ -33,7 +33,7 @@ if ($result[0]){ pg_close($dbconn); -// $handle = fopen('/tmp/prueba2.txt','w'); +// $handle = fopen(SimpleSAML_Utilities::getTempDir() . '/prueba2.txt','w'); // fwrite($handle, 'prueba'); // fclose ($handle);