Bugfix 101108 for v0.951

Started by Feline, 10 years ago

previous topic - next topic

0 Members and 1 Guest are viewing this topic.

Feline

*
10 years ago
If a Guest access to a Board or Topic, they is't exist or not enabled for Guests, a error is logged and the Guest is redirected to the login screen.

At this point, the Portal is't initiated, so the blocks not visible and the "Forum" botton is missed.
I have debug that and found the Problem. Note, that this is NOT a security hole.

To fix this, you have to modify the Sources/Security.php and Sources/PortaMx/PortaMx.php.

PortaMx.php
Find (line 150):
Code Select
$pmxhome = array_shift($context['linktree']);
$pmxforum = array('url' => $scripturl . '?action=forum', 'name' => $txt['forum']);

Add BEFORE:
Code Select
if(empty($context['linktree']))
$context['linktree'] = array(array('url' => $scripturl, 'name' => $mbname));


Security.php
Find (line 170):
Code Select
function is_not_guest($message = '')
{
global $user_info, $txt, $context;

// Luckily, this person isn't a guest.
if (!$user_info['is_guest'])
return;

REPLACE with:
Code Select
function is_not_guest($message = '')
{
global $user_info, $txt, $context, $sourcedir;

// Luckily, this person isn't a guest.
if (!$user_info['is_guest'])
return;

//-> start add PortaMx
 if(!defined('PortaMx'))
 {
   require_once($sourcedir . '/PortaMx/PortaMx.php');
   PortaMx();
 }
//-> end add PortaMx


Thats all. Now the error is gone.

Fel
Many are stubborn in relation to the way, but less in relation to the target.

haderaschta

*
#1
10 years ago
hmmm, when i make this changes then my forum doesn't work anymore ...

Feline

*
#2
10 years ago
Then I think, you have that not correct modified ..

Fel
Many are stubborn in relation to the way, but less in relation to the target.

haderaschta

*
#3
10 years ago
made the changes 2 times ...  :o

Feline

*
#4
10 years ago
What for error is shown?
What is logged in the errorlog?
Other mods installed?

A little bit more info is need as this ..

Also you can attach the both modificated files (as .zip)

Fel

Many are stubborn in relation to the way, but less in relation to the target.

haderaschta

*
#5
10 years ago
oh funny, i didn't see the upload package and changed the files manually. and that doesn't work either on my homepage and on my local-server.
now i did upload the patch-package and that worked .... can't get it why it's so but it is so ... :D

sorry for disturbing ....  ;)

* Shouts

Feline
5 months ago
Today we update our Forum to the Version 1.45
Feline
8 months ago
Today we update our Forum to Version 1.4
This release is full compatible with the EU GDPR
Feline
10 months ago
Update for PortaMx 1.54 ecl released.
With this updates the Portal works with PHP 7.x and SMF 2.0.15
Feline
10 months ago
PortaMx Forum 1.3
released !

*
Feline
a year ago
Today we switched to PHP 7.2 and activate Opcode caching.
Fast .. Very fast *
Feline
a year ago
Today we upgrade our old SMF 2.0 Forum to PortaMx Forum *

* Calendar

Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28