6801
Mamba
Re: 2.2.3 How to register.php with captcha?
  • 2014/7/8 23:46

  • Mamba

  • Moderator

  • Posts: 11377

  • Since: 2004/4/23


Quote:
Yes i know, normaly captcha is with xoops 2.5.6 but i don't know why i don't find the captcha "on-off" in setting panel.
So, i have put this hack and it's work's easily, i don't have searching more.

You are right, these things should be in XOOPS Preferences Panel, and I know that Richard wants to bring all these configuration items into one place in XOOPS 2.6.0.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



6802
Mamba
Re: XOOPS 2.5.7 Final: PM issues
  • 2014/7/8 23:43

  • Mamba

  • Moderator

  • Posts: 11377

  • Since: 2004/4/23


Richard has just committed the fix to XOOPS SVN, and I have tested it, and it works perfectly!

Thanks, Richard!!!
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



6803
Mamba
Re: XOOPS 2.5.7 Final: PM issues
  • 2014/7/8 23:29

  • Mamba

  • Moderator

  • Posts: 11377

  • Since: 2004/4/23


Quote:
What is happening is that when you select the messages to delete, XOOPS puts them into an array, which is then placed in $_POST. When XOOPS asks you to confirm to delete these messages, it encodes the array with JSON, and after you confirm the deletion, it should decode it again.
Unfortunately, somehow in this particular installation, it is being converted to a string, before XOOPS has a chance to decode it.

Good teamwork always leads to quicker results!

I was further investigating it and found out that the change was being done by the Protector in \xoops_lib\modules\protector\class\protector.php in line 636:


foreach ($_POST as $key => $val) {

    if ( 
substr$key , -) == 'id' && ! is_array$_POST$key] ) ) {

        
$newval preg_replace'/[^0-9a-zA-Z_-]/' '' $val ) ;

        
$_POST$key ] = $HTTP_POST_VARS$key ] = $newval ;

        if (
$_REQUEST$key ] == $_POST$key ]) {

            
$_REQUEST$key ] = $newval ;

        }

    }

}



So value that was stored in $_POST['msg_id'] like this: "[123,456]" would be converted to "123456", and JSON could not decode it again into an array.

Resized Image

Once this value has been changed, then the $pm_handler on line 52 in /pm/viewpmsg.php could never find the message, so $pm is null, and creates a Fatal Error in line 53:

Resized Image


This was the file trace:

Resized Image


and by going back step by step, we could see that the change was triggered by this code on line 66 in /xoops_lib/modules/protector/include/precheck_functions.php


// force intval variables whose name is *id

if( ! empty( $conf['id_forceintval'] ) ) $protector->intval_allrequestsendid() ;



because in the "msg_id" we have the "id".

I had to leave to a meeting, but Richard was kind enough to take a look at this, and he found the issue:

Quote:
I am able to turn the problem on and off with a protector preference, Force intval. The default value for this option is off, but when on it looks for request field names ending with 'id' and force them to be integers. Since the pm code uses 'msg_id' for the list of messages to delete in the confirmation, protector manges the value.

I ran a test on a clean system. Created 3 pm's, turned on "Force intval to variables like id" in protector preferences. Attempting to delete the pm's generates error:

"Warning: array_map(): Argument #2 should be an array in file /modules/pm/viewpmsg.php line 47"



Turn off the same preference everything works again.

Since protector is looking for fields ending with 'id', the solution is to end the problem name with something else. This problem effects both the pm module, and the simpler core pm functionality.

I've got patches for both ready to check in that solve this problem.

If anyone can find an additional circumstance that triggers this error, please let us know.

Thanks to Richard, another mystery has been solved, and we'll have a fix for it going forward.

Thanks to Roby73 for reporting the issues, and to Richard for fixing it.

And thanks to PhpStorm for being such a good tool that helped to debug the code here.

Resized Image
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



6804
Roby73
Re: XOOPS 2.5.7 Final: PM issues
  • 2014/7/8 23:12

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Thank you!.
In mainfile.php i have:


define('XOOPS_GROUP_ADMIN''1');     

define('XOOPS_GROUP_USERS''2');     

define('XOOPS_GROUP_ANONYMOUS''3');




6805
bosco
Re: Installation problem XOOPS 2.6.0
  • 2014/7/8 21:30

  • bosco

  • Just popping in

  • Posts: 49

  • Since: 2004/8/5 1


Hi,

i've already try multiple times.

I've looked into source, and found this :



        <
link rel="stylesheet" media="screen" href="" />



And in xotpl\theme_head.html, found this :



    <{
assets

        assets
="xoops.css,themes/default/media/bootstrap/css/xoops.bootstrap.css,themes/default/css/style.css"

        
output="css"

    
}>

    <
link rel="stylesheet" media="screen" href="<{$asset_url}>" />

    <{/
assets}>



Maybe an error in assets ?



6806
mandrake
Re: 2.2.3 How to register.php with captcha?
  • 2014/7/8 21:24

  • mandrake

  • Just popping in

  • Posts: 16

  • Since: 2014/5/26


Quote:
I am curious why would you use it in XOOPS 2.5.6, if it has already a Captcha for registration "out of the box"?


Yes i know, normaly captcha is with xoops 2.5.6 but i don't know why i don't find the captcha "on-off" in setting panel.

So, i have put this hack and it's work's easily, i don't have searching more.




6807
Hadesteam
Re: 2.2.3 How to register.php with captcha?
  • 2014/7/8 18:02

  • Hadesteam

  • Not too shy to talk

  • Posts: 162

  • Since: 2011/9/5 1


hhttp://www.kulturystyka.org.pl/new_site/modules/profile/register.php Nice :)

But i have some errors:
http://www.kulturystyka.org.pl/new_site/modules/news/ - i didnt see the title of articles.

mamba napisz mi jeszcze proszę jak usunąć te "krzaki" na stronie ?

How add block latest news ?



6808
Hadesteam
Re: 2.2.3 How to register.php with captcha?
  • 2014/7/8 16:49

  • Hadesteam

  • Not too shy to talk

  • Posts: 162

  • Since: 2011/9/5 1


Yes, i forget some points of this instruction. I do it again .... upgrade not finished

thx Mamba



6809
Mamba
Re: 2.2.3 How to register.php with captcha?
  • 2014/7/8 16:15

  • Mamba

  • Moderator

  • Posts: 11377

  • Since: 2004/4/23


You definitely should have Protector installed and activated for security reasons.

I suspect, there are some lines of code left in your mainfile.php that should be removed. Please read the XOOPS Installation Guide, specifically the paragraph about Protector Pre- and Post-checks on page 35.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



6810
Hadesteam
Re: 2.2.3 How to register.php with captcha?
  • 2014/7/8 15:52

  • Hadesteam

  • Not too shy to talk

  • Posts: 162

  • Since: 2011/9/5 1


When i disabled Protector in phpmyadmin I inputs to the admin panel

Please look at this: http://www.kulturystyka.org.pl/panel-admina.gif




TopTop
« 1 ... 678 679 680 (681) 682 683 684 ... 29425 »



Login

Who's Online

83 user(s) are online (62 user(s) are browsing Support Forums)


Members: 0


Guests: 83


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits