B
B
blayter2015-12-30 17:07:49
symfony
blayter, 2015-12-30 17:07:49

How to prevent links from word and excel from being redirected to the login page?

I am using Symfony 2 version 2.5.5. Links to the site from anywhere work without problems, but if you copy them to word or excel, they will redirect to the login page.
Log:
security.INFO: Populated SecurityContext with an anonymous Token []
security.DEBUG: Access is denied (user is not fully authenticated)
security.DEBUG: Calling Authentication entry point []
I fixed this by adding to app_dev.php -
if ( strpos($_SERVER['HTTP_USER_AGENT'],'ms-office')!==false){
die();
}
But I think this is not the best option, can you tell me another solution?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2015-12-30
@xmoonlight

If you just stop - use the rules in .htaccess,
this will significantly reduce the load on the server, because. the php handler will no longer be dealt with...

A
Alex, 2015-12-30
@shoomyst

I don't understand what you are complaining about.
I don't think Symfony makes MS Office stand out in any special way.
There is a problem with authorization, you are opening a page that only authenticated users have access to. when transitioning from the Word, the cookie with the session is not transmitted, then accordingly there is no information about your authentication status, and you are thrown to login

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question