e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
323 stars 214 forks source link

[Bug]: Logout Redirect Issue #5218

Open Vodhin opened 8 months ago

Vodhin commented 8 months ago

What e107 version are you using?

v2.3.3

Bug description

After logging out, I am being redirected to a URL for a random image called by something in my plugin. Does NOT happen when Logout is clicked while on other e107 pages, so something in my Plugin is tricking the Logout call, maybe because I'm using a $variable that the logout uses. Where in e107 should I look?

logout_error1

logout_error2

How to reproduce

This is a new behavior I don't remember seeing before v2.3.3 - but - I hardly ever log out and just close my browser instead.

Only happens when on a page created by my Real-estate Plugin, and the incorrect URL is different each time:

https://estate.vodhin.org/e107_plugins/estate/media/prop/thm/14-1-0-349.jpeg https://estate.vodhin.org/e107_plugins/estate/media/prop/thm/11-1-0-303.jpeg https://estate.vodhin.org/e107_plugins/estate/media/prop/thm/13-1-0-336.jpeg

etcetera.

Expected behavior

I expect to be redirected to the home page or what ever page I was on.

What browser(s) are you seeing the problem on?

Chrome / Brave

PHP Version

7.4.33

CaMer0n commented 8 months ago

hi @Vodhin ! e107 checks for the query ?logout on any url. Perhaps check your e_url.php file for a match?

Vodhin commented 8 months ago

hi @Vodhin ! e107 checks for the query ?logout on any url. Perhaps check your e_url.php file for a match?

My e_url.php file only has


class estate_url 
{
    function config() 
    {
        $config = array();

        $config['listings'] = array(
            'alias'         => EST_SEF_LISTINGS,
            'regex'         => '^{alias}/?$',
            'sef'           => '{alias}',
            'redirect'      => '{e_PLUGIN}estate/listings.php',
        );

        return $config;
    }

Not sure if I need anything else in there,

Jimmi08 commented 8 months ago

Hi, maybe it is not related but I have members only site and after logging in, it is redirected to some theme file f.e. shuffle.min.js.map Login is finished. I logout, try login again and everything is ok then. The action in login form is correct, checked. Very weird. next time- redirected to bootstrap.bundle.min.js.map

Vodhin commented 7 months ago

This issue seems to be related to resources that failed to load, as reported in the JavaScript Console. In my case there were some images called by database when the page loads but the files don't exist. The problem disappeared once I removed those images from the database.