Bug 5.75: hook _global login_ok can not use absolute URL

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
Joined: 2019-05-21 22:42
Contact:

Bug 5.75: hook _global login_ok can not use absolute URL

Post by onoehring » 2019-06-13 08:10

Hi,

for tests I tried

Code: Select all

function login_ok($memberInfo, &$args){
return 'https://google.com';
}
All users should be redirected to google ... but - opposite to the explanation in the comments of that function an error occurs:
The requested URL /https://google.com was not found on this server.
Olaf
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 940
Joined: 2018-04-01 10:12

Re: Bug 5.75: hook _global login_ok can not use absolute URL

Post by pböttcher » 2019-06-13 08:35

Hi,

the $args feature seems not to be implemented in the login_ok check.

If you need this feature you can call

redirect('https://www.google.com',true);

directly instead of passing the url in the return

onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 541
Joined: 2019-05-21 22:42
Contact:

Re: Bug 5.75: hook _global login_ok can not use absolute URL

Post by onoehring » 2019-06-13 09:30

Hi,

I think the error was actualls
/https:/google.com
after the https: was only a single / if I rememeber correct. So strange things going on here.
Rhetorical question: Why not simply redirect to whatever is received?

Olaf
Some postings I was involved, you might find useful:
Backup your database (viewtopic.php?f=4&t=3341); Improve security (viewtopic.php?f=4&t=3168); Field Permissions (viewtopic.php?f=4&t=3308); Custom (error) message (viewtopic.php?f=7&t=1740&p=10871#p10906); Audit Log (viewtopic.php?f=4&t=1369&p=10407); Two Factor Authentication (viewtopic.php?f=7&t=3306&p=11478); Add 2nd SAVE CHANGES button (viewtopic.php?f=2&t=3242&p=11104); Place a search on details view (viewtopic.php?f=2&t=3479&p=12484#p12484); Column-Value-Based-Permissions (viewtopic.php?f=4&t=3498)

Post Reply