bug in user.php - function matchEditToken ?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

bug in user.php - function matchEditToken ?

hopespoppa
I changed user.php as stated below. went to preferences. unchecked jump to
navigation, clicked save and received the following error.

"Undefined variable wgSessionsInMemcached in C:\wiki\Mediawiki\mediawiki-
1.6.3\includes\User.php on line 1693"


------
ipbwiki list ipbwiki.list at gmail.com
Sat Apr 8 13:27:31 UTC 2006

Hi,in the function matcheditToken there is a call to a function only
availableif you use memcached. The line in question is

$mckey = memsess_key( session_id() );

the memsess_key function is registered in the function "SetupSession"
(alsoin user.php). This function is only included if $wgSessionsInMemcached
istrue tough (as it should).

to solve the problem the function matcheditToken has to be
altered.searchfor the line:

 if ( $val != $sessionToken ) {
and change this to:

  if ( $val != $sessionToken and $wgSessionsInMemcached ) {

This change will avoid the error "call to undefined function
memsess_key"when the session is lost.
Best regards,
Peter.

<http://mail.wikipedia.org/pipermail/mediawiki-l/2006-April/011236.html>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

hopespoppa
I found a similar discussion at
http://www.mwusers.com/forums/showthread.php?t=1528
where they give a code modification as

    function matchEditToken( $val, $salt = '' ) {
      return true;
    }


On 5/1/06, Brian Carpenter <[hidden email]> wrote:

>
>  I changed user.php as stated below. went to preferences. unchecked jump
> to navigation, clicked save and received the following error.
>
> "Undefined variable wgSessionsInMemcached in C:\wiki\Mediawiki\mediawiki-
> 1.6.3\includes\User.php on line 1693"
>
>
> ------
> ipbwiki list ipbwiki.list at gmail.com
> Sat Apr 8 13:27:31 UTC 2006
>
> Hi,in the function matcheditToken there is a call to a function only
> availableif you use memcached. The line in question is
>
> $mckey = memsess_key( session_id() );
>
> the memsess_key function is registered in the function "SetupSession"
> (alsoin user.php). This function is only included if
> $wgSessionsInMemcached istrue tough (as it should).
>
> to solve the problem the function matcheditToken has to be altered.searchfor the line:
>
>  if ( $val != $sessionToken ) {
> and change this to:
>
>   if ( $val != $sessionToken and $wgSessionsInMemcached ) {
>
> This change will avoid the error "call to undefined function
> memsess_key"when the session is lost.
> Best regards,
> Peter.
>
> <http://mail.wikipedia.org/pipermail/mediawiki-l/2006-April/011236.html>
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

Rob Church
On 02/05/06, Brian Carpenter <[hidden email]> wrote:
> I found a similar discussion at
> http://www.mwusers.com/forums/showthread.php?t=1528
> where they give a code modification as
>
>     function matchEditToken( $val, $salt = '' ) {
>       return true;
>     }

First, that code modification is wrong and will make a lot of
operations unsafe. Second, I believe the issue is resolved in the code
in Subversion; a live hack was committed accidentally, and should now
be gone.


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

hopespoppa
Thanks for the warning! What's the best way to get/implement the subversion?


On 5/2/06, Rob Church <[hidden email]> wrote:

>
> On 02/05/06, Brian Carpenter <[hidden email]> wrote:
> > I found a similar discussion at
> > http://www.mwusers.com/forums/showthread.php?t=1528
> > where they give a code modification as
> >
> >     function matchEditToken( $val, $salt = '' ) {
> >       return true;
> >     }
>
> First, that code modification is wrong and will make a lot of
> operations unsafe. Second, I believe the issue is resolved in the code
> in Subversion; a live hack was committed accidentally, and should now
> be gone.
>
>
> Rob Church
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

Rotem Liss
See http://www.mediawiki.org/wiki/Download_from_SVN.


Brian Carpenter wrote:

>Thanks for the warning! What's the best way to get/implement the subversion?
>
>
>On 5/2/06, Rob Church <[hidden email]> wrote:
>  
>
>>On 02/05/06, Brian Carpenter <[hidden email]> wrote:
>>    
>>
>>>I found a similar discussion at
>>>http://www.mwusers.com/forums/showthread.php?t=1528
>>>where they give a code modification as
>>>
>>>    function matchEditToken( $val, $salt = '' ) {
>>>      return true;
>>>    }
>>>      
>>>
>>First, that code modification is wrong and will make a lot of
>>operations unsafe. Second, I believe the issue is resolved in the code
>>in Subversion; a live hack was committed accidentally, and should now
>>be gone.
>>
>>
>>Rob Church
>>_______________________________________________
>>MediaWiki-l mailing list
>>[hidden email]
>>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>
>>    
>>
>_______________________________________________
>MediaWiki-l mailing list
>[hidden email]
>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
>  
>

_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

Rob Church
In reply to this post by hopespoppa
On 02/05/06, Brian Carpenter <[hidden email]> wrote:
> Thanks for the warning! What's the best way to get/implement the subversion?

See http://www.mediawiki.org/wiki/Download_from_SVN. You want the
REL1_6 branch. (1.6.4 hasn't been frozen and tagged for release at
this time.)


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

hopespoppa
 forgive my ignorace, but I don't understand the statement in the 'Download
from SVN' article: "Some time would pass and then 1.6.3 would be released,
to upgrade simply do:
svn up
inside the root of the installation directory."
In windows, I did cmd>run to get to DOS. Went to my
c:\wiki\mediawiki\mediawiki-1.6.3 directory and entered:
"svn co http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_6/phase3"
and got an error "svn is not a recognizable command"
is svn a unix command?
What doe 'simply do' mean?
brian


On 5/2/06, Rob Church <[hidden email]> wrote:

>
> On 02/05/06, Brian Carpenter <[hidden email]> wrote:
> > Thanks for the warning! What's the best way to get/implement the
> subversion?
>
> See http://www.mediawiki.org/wiki/Download_from_SVN. You want the
> REL1_6 branch. (1.6.4 hasn't been frozen and tagged for release at
> this time.)
>
>
> Rob Church
> _______________________________________________
> MediaWiki-l mailing list
> [hidden email]
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: bug in user.php - function matchEditToken ?

Rob Church
On 02/05/06, Brian Carpenter <[hidden email]> wrote:

>  forgive my ignorace, but I don't understand the statement in the 'Download
> from SVN' article: "Some time would pass and then 1.6.3 would be released,
> to upgrade simply do:
> svn up
> inside the root of the installation directory."
> In windows, I did cmd>run to get to DOS. Went to my
> c:\wiki\mediawiki\mediawiki-1.6.3 directory and entered:
> "svn co http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_6/phase3"
> and got an error "svn is not a recognizable command"
> is svn a unix command?
> What doe 'simply do' mean?

If using Windows, install a Windows Subversion client such as
TortoiseSVN, from http://tortoisesvn.tigris.org. The "simply do" bit
was probably written for those people who know instinctively what
Subversion is and how to use it.


Rob Church
_______________________________________________
MediaWiki-l mailing list
[hidden email]
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l