[RCU] roundcube webmail integration

Zorgh zorgh at koysevox.org
Tue Feb 3 22:18:51 CET 2009


Zorgh a écrit :
> Hi,
>
> I have problem with iframe. I have installed a CMS and I have integrated
> roundcubemail into a frame.
> So to protect an account from unauthorized access, I have modified the
> code (index.php) :
> <?php
> ...
> $referer = $_SERVER["HTTP_REFERER"];
> $url = parse_url($referer);
> $url = $url['scheme']."://".$url['host'].dirname($url['path'])."/";
> $namesess = sprintf("UV%u", crc32($url));
>
> session_name($namesess);
> session_start();
>
> if (isset($_SESSION['SESS_NICKNAME'])) {
> ...
> // if we arrive here, something went wrong
> raise_error(array(
>   'code' => 404,
>   'type' => 'php',
>   'line' => __LINE__,
>   'file' => __FILE__,
>   'message' => "Invalid request"), true, true);
> }
> else {
>     echo "Error";
>     exit();
> }                
> ?>
> }
>
> The login dialog box display correctly.
> The problem is: when I click on the authentication button with a correct
> login info it display "Error".
>
> How to fix it ?
>
> Sorry for my english ! I'm french.
>
> Thx so much
>
> _______________________________________________
> List info: http://lists.roundcube.net/users/
>   
Sorry :

<?php
// include environment
require_once 'program/include/iniset.php';

$referer = $_SERVER["HTTP_REFERER"];
$url = parse_url($referer);
$url = $url['scheme']."://".$url['host'].dirname($url['path'])."/";
$namesess = sprintf("UV%u", crc32($url));

session_name($namesess);
session_start();

if (isset($_SESSION['SESS_NICKNAME'])) {
// init application and start session with requested task
$RCMAIL = rcmail::get_instance();
...
// if we arrive here, something went wrong
raise_error(array(
  'code' => 404,
  'type' => 'php',
  'line' => __LINE__,
  'file' => __FILE__,
  'message' => "Invalid request"), true, true);
}
else {
    echo "Error";
    exit();
}               
?>

_______________________________________________
List info: http://lists.roundcube.net/users/



More information about the users mailing list