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
mhhk im being dumb
#9
Index.php does not have the check in it by default because if you locked people out of the homepage, then they wouldn't be able to login. You could always do

Code:
if(!$user->isLoggedIn){
Code:
Redirect::to('users/login.php);
Code:
}


somewhere near the top of the index to force them to login without using the heavy handed security feature. I'm going to be cleaning up what happens when someone doesn't have access in 4.2. I've been testing it in some of my other projects.

One of the tough things is that we work under the assumption that there should be "public" parts of most projects where people can at least read a little information before deciding if they want to join or login. The above redirect would cause issues with that.

Is there another page that should be secured, that is not secured by default?

And yes...every UserSpice page that you want to be able to log people out of needs the
if(!securePage($_SERVER['PHP_SELF'])){die();};
line or UserSpice will know that you're not supposed to be there, but it won't be able to kick you out.

I don't think this can be in the init. I can double check that though.

I definitely appreciate your feedback and I'll look into the init fixes thing too. The main problem with editing the init is that it is created on the fly at install, so we don't know what's in there to find and replace things. We're moving more things out of it, to pretty much leave just the db credentials over time. It's tough when you're trying to maintain compatibility.
  Reply


Messages In This Thread
mhhk im being dumb - by raven - 11-22-2016, 12:29 PM
mhhk im being dumb - by mudmin - 11-22-2016, 03:18 PM
mhhk im being dumb - by raven - 11-22-2016, 05:53 PM
mhhk im being dumb - by raven - 11-22-2016, 08:29 PM
mhhk im being dumb - by mudmin - 11-23-2016, 12:16 AM
mhhk im being dumb - by raven - 11-23-2016, 01:55 PM
mhhk im being dumb - by mudmin - 11-24-2016, 04:01 PM
mhhk im being dumb - by sabr - 01-15-2017, 03:04 PM
mhhk im being dumb - by mudmin - 01-15-2017, 03:17 PM
mhhk im being dumb - by sabr - 01-15-2017, 03:56 PM
mhhk im being dumb - by mudmin - 01-15-2017, 03:58 PM
mhhk im being dumb - by mudmin - 01-15-2017, 04:01 PM
mhhk im being dumb - by mudmin - 01-15-2017, 04:03 PM
mhhk im being dumb - by sabr - 01-15-2017, 04:26 PM
mhhk im being dumb - by mudmin - 01-15-2017, 04:40 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)