Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP: Joining a browser session from a link in MS Office
    primarykey
    data
    text
    <p>I wonder if anyone can suggest an answer here:</p> <p>We have a system which is secured using PHP sessions (and other measures such as SSL, before anyone starts talking security at me!) and we want to send out direct links into the system via email, when contacting clients about specific issues. The links we send out include GET parameters.</p> <p>Our advice has been for the client to make sure they're logged in, then click the link - the link launches in the browser, picks up the session, and takes the user straight to the required page. However, this doesn't work when the user clicks the link from a Microsoft Office application.</p> <p>When clicking the link from Outlook (or indeed, Excel) the session variable is not picked up, and the user is asked to re-authenticate. Digging a bit further, it appears as though the request is coming through with user-agent set to <code>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0E; .NET4.0C; ms-office)</code> but the site is launching in Chrome (which is also the browser where the session is set). I wonder if there's some session-security code kicking in, saying that if the browser is different, the session must be spoofed?</p> <p>Trying to get around this, I tried setting up a redirect page for the initial page-load: </p> <pre><code>if (isset($_GET['targetpage'])) { // It's a GET request - redirect using header-location $all_get = $_GET; unset($all_get['targetpage']); $redir = $_GET['targetpage'].'?'.http_build_query($all_get); header('User-Agent:'); header("Location: {$redir}"); die(); } </code></pre> <p>This fails: the request still comes through with the User-Agent set, and the session is absent.</p> <p>Any thoughts/suggestions?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload