0

I experience a strange behaviour

Some of my partner uses a spreadsheet in libre office and populate a cell with a hyperlink, like :

https://backoffice.mydomain.com/admin_xxxxx/sales/order/view/order_id/16423/

a click on this link, in libre office / open office / excel always leads to the backoffice home page, instead of directing to the right page.

Link is allright, copy/paste is ok.

things discovered since original post:

  • After some apache log read, i noticed that the first http response is a 302.
  • I also haven't mentionned that the /key/ from the url has been removed by using magento 2 backoffice option.
  • This has been reproduced on two Magento 2 instance, on two different servers.

anyone having an idea ?

1 Answer 1

0

Answer after some research.

It appears that the first call (GET) to reach the target URL is done by the system or the application.

examples

a click on a link in a spreadsheet, on :

linux/libre office will generate an user agent like

Mozilla/5.0 (X11; Linux x86_64) KHTML/5.36.0 (like Gecko) Konqueror/5 KIO/5.36

windows/excel will generate

Microsoft Office Excel 2014

That will of course generate a 302 on apache side, because the calling agents are not loggedin, in backoffice of Magento 2.

In fact, following the example, theses are the ones loggedin :

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0)

After the 302, magento redirect, but now the loggedin browser takes the hand (default system browser). And this leads to a redirect on the dashboard admin url.

This worked in M1, because session/identification for the backoffice used cookies or something accessible by every user agent on the local computer. M2 has changed this behaviour. So, this "error" seems to be normal at a magento 2 point of view.

Options can be following, but they are far away from the original question :

  • Force the application to use a different user agent
  • Recode a part authentification process for Magento 2 backoffice to allow that, probably introducing security troubles.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.