The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERR_TOO_MANY_REDIRECTS
#11
Thank you Brandin

 there is no securePage function in users/helpers/us_helper but it exists in permissions.php
Code:
...
if (checkPermission($pagePermissions)){
                return true;
            }elseif  (in_array($user->data()->id, $master_account)){ //Grant access if master user
                return true;
            }else {

                if (!$homepage = Config::get('homepage'))
                $homepage = 'index.php';
                $fields = array(
                    'user'    => $user->data()->id,
                    'page'    => $pageID,
                    'ip'        => $ip,
                );
                $db->insert('audit',$fields);
                require_once $abs_us_root.$us_url_root.'usersc/scripts/did_not_have_permission.php';
                Redirect::to($homepage);
                return false;
...
I've found that in my case Config::get('homepage') has bool(false) [font=Monaco, Consolas, Courier, monospace]value (I thought it must be the page address) so [/font]the variable $homepage gets value [font=Menlo, monospace]string(9) "index.php" and then script tries to redirect to index.php in the same folder - so to the same page to which the user does not have access and we get a loop.[/font]
Is this logic correct?

Now I've solved the problem by adding my own correct redirect in [font=Monaco, Consolas, Courier, monospace]did_not_have_permission.php [/font]
But I think something is wrong with the script.


And what about the fingerprint error?
  Reply


Messages In This Thread
ERR_TOO_MANY_REDIRECTS - by Aido - 02-03-2019, 01:52 PM
RE: ERR_TOO_MANY_REDIRECTS - by mudmin - 02-03-2019, 02:24 PM
RE: ERR_TOO_MANY_REDIRECTS - by mudmin - 02-03-2019, 02:29 PM
RE: ERR_TOO_MANY_REDIRECTS - by Aido - 02-03-2019, 02:56 PM
RE: ERR_TOO_MANY_REDIRECTS - by mudmin - 02-03-2019, 03:00 PM
RE: ERR_TOO_MANY_REDIRECTS - by mudmin - 02-03-2019, 03:03 PM
RE: ERR_TOO_MANY_REDIRECTS - by Aido - 02-03-2019, 04:08 PM
RE: ERR_TOO_MANY_REDIRECTS - by Brandin - 02-03-2019, 04:21 PM
RE: ERR_TOO_MANY_REDIRECTS - by Aido - 02-03-2019, 04:44 PM
RE: ERR_TOO_MANY_REDIRECTS - by Brandin - 02-03-2019, 09:28 PM
RE: ERR_TOO_MANY_REDIRECTS - by Aido - 02-04-2019, 05:17 AM
RE: ERR_TOO_MANY_REDIRECTS - by Aido - 02-06-2019, 05:45 AM
RE: ERR_TOO_MANY_REDIRECTS - by Brandin - 02-08-2019, 11:02 PM
RE: ERR_TOO_MANY_REDIRECTS - by Aido - 02-09-2019, 03:34 AM
RE: ERR_TOO_MANY_REDIRECTS - by Brandin - 02-11-2019, 03:50 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)