aldrinbaroi / mediawiki-page-attachment

Automatically exported from code.google.com/p/mediawiki-page-attachment
Other
1 stars 1 forks source link

tesing pageattachment alpha with small start problems #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I have some small trouble with Pageattachment.

On save any article i got this logfile warning message:
 PHP Warning:  Missing argument 12 for PageAttachment\\RequestHandler::onArticleSaveComplete() in /var/www/mediawiki/extensions/PageAttachment/RequestHandler.php on line 135, referer: http://mydomain.com/index.php?title=Special:PageAttachmentUpload&rvt=62c2cd89ba8c847ebe885b7ee3075ddcc80ba010186ef1d5de7d27503b72ba29&rnd=4Z77527FX0997TCVZZ2PBRC

On open a document i got the logfile warning/notice message:
PHP Warning:  Missing argument 1 for 
PageAttachment\\Security\\SecurityManager::isAttachmentDownloadAllowed(), 
called in 
/var/www/mediawiki/extensions/PageAttachment/download/DownloadManager.php on 
line 53 and defined in 
/var/www/mediawiki/extensions/PageAttachment/security/SecurityManager.php on 
line 571, referer: 
https://mydomain.com/index.php?title=Hauptseite&rt=b3de4af83ad5dcee7412579fdbaac
2671f850f274701eda0e422f64ce245a981
PHP Notice:  Undefined variable: protectedPage in 
/var/www/mediawiki/extensions/PageAttachment/security/SecurityManager.php on 
line 573, referer: 
https://mydomain.com/index.php?title=Hauptseite&rt=b3de4af83ad5dcee7412579fdbaac
2671f850f274701eda0e422f64ce245a981
PHP Notice:  Undefined variable: protectedPage in 
/var/www/mediawiki/extensions/PageAttachment/security/SecurityManager.php on 
line 577, referer: 
https://mydomain.com/index.php?title=Hauptseite&rt=b3de4af83ad5dcee7412579fdbaac
2671f850f274701eda0e422f64ce245a981

After add a document by "Browse/Search & Attach File" i got the message:
» Security Warning: Unable to Authenticate Your Request « 
no message in logfile.
Whats this message meaning?

What version of the product are you using? On what operating system?

  PageAttachment version  : 3.0.0 alpha1
  MediaWiki version       : 1.19
  PHP version             : 5.3.10
  Operating System name   : Ubuntu Server
  Operating System version: 12.04

Please provide any additional information below.

All actions doing with WikiSysop (sysop).

After installation of Mediawiki all funktions work without problems.

Installing Pageattachement 3.0.0 Alpha 1.

All functions work - pageattachment too.

Greetings 
Daniel M.

Original issue reported on code.google.com by menzel.d...@gmail.com on 13 Jun 2012 at 9:34

GoogleCodeExporter commented 9 years ago
Hi Daniel:

Thank you for testing and submitting the bug report.  The details you provide 
would really help fixing the issues.

Aldrin

Original comment by Aldrin.Baroi@gmail.com on 14 Jun 2012 at 4:12

GoogleCodeExporter commented 9 years ago
Issue:
=====
  PHP Warning:  Missing argument 12 for PageAttachment\\RequestHandler::onArticleSaveComplete() 
  in /var/www/mediawiki/extensions/PageAttachment/RequestHandler.php on line 135, referer: 
  http://mydomain.com/index.php?title=Special:PageAttachmentUpload&
  rvt=62c2cd89ba8c847ebe885b7ee3075ddcc80ba010186ef1d5de7d27503b72ba29&rnd=4Z77527FX0997TCVZZ2PBRC

This one is related to "ArticleSaveComplete" hook and looks like the 
"&$redirect" parameter has been dropped from the hook call.  See: 
http://www.mediawiki.org/wiki/Manual:Hooks/ArticleSaveComplete

Updated code to remove the parameter from function signature.

Original comment by Aldrin.Baroi@gmail.com on 14 Jun 2012 at 5:01

GoogleCodeExporter commented 9 years ago
Issue:
=====
  PHP Warning:  Missing argument 1 for PageAttachment\\Security\\SecurityManager::isAttachmentDownloadAllowed(),
  called in /var/www/mediawiki/extensions/PageAttachment/download/DownloadManager.php on line 53
  and defined in /var/www/mediawiki/extensions/PageAttachment/security/SecurityManager.php on line 571,
  referer: https://mydomain.com/index.php?title=Hauptseite&rt=b3de4af83ad5dcee7412579fdbaac2671f850f274701eda0e422f64ce245a981
  PHP Notice:  Undefined variable: protectedPage in /var/www/mediawiki/extensions/PageAttachment/security/SecurityManager.php
  on line 573, referer: https://mydomain.com/index.php?title=Hauptseite& 
  rt=b3de4af83ad5dcee7412579fdbaac2671f850f274701eda0e422f64ce245a981
  PHP Notice:  Undefined variable: protectedPage in /var/www/mediawiki/extensions/PageAttachment/security/SecurityManager.php
  on line 577, referer: https://mydomain.com/index.php?title=Hauptseite& 
  rt=b3de4af83ad5dcee7412579fdbaac2671f850f274701eda0e422f64ce245a981

This is a real problem, security check for protected page would have failed.  
Updated code to retrieve page protection setting and pass it to the security 
manager.

Original comment by Aldrin.Baroi@gmail.com on 14 Jun 2012 at 5:56

GoogleCodeExporter commented 9 years ago
Hi Daniel:

Could you provide a little bit more details on the following issue:

  After add a document by "Browse/Search & Attach File" i got the message:
    » Security Warning: Unable to Authenticate Your Request « 
  no message in logfile.

Specifically, need to know when did it occur, meaning, did you click on 
"Browser/Search..." button and attached the file right away or, there was a 
long time gap between when you clicked on "Browse/Search..." and when you 
clicked on the attach file "Paper Click" button.  Or, did you open a second 
browser tab/window where you either logged out or singed in as a different user?

Are you using any caching server, for example: memcached?

Every request is verified with a security token.  The security token is stored 
in PHP session and how long a session is active and valid is configured, 
usually in "php.ini" file.  See: 
http://nz.php.net/manual/en/session.configuration.php#ini.session.cache-expire. 
 When the token was checked for validity, either the token was not found in the 
session or, did not match.

So, more details on your Wiki system setup and details on the foregoing 
questions would be helpful to identify the root cause.

Sincerely yours,

Aldrin

Original comment by Aldrin.Baroi@gmail.com on 14 Jun 2012 at 6:29

GoogleCodeExporter commented 9 years ago
Hi Daniel:

So, two things fixed:

  1) ArctileSaveComplete hook updated to account for dropped "redirect" parameter
  2) Fixed security check for protected pages

Need more details on the third (3rd) issue:

  After add a document by "Browse/Search & Attach File" i got the message:
    » Security Warning: Unable to Authenticate Your Request « 
  no message in logfile.

Please, provide any information that may help fix this issue.

Sincerely yours,

Aldrin

Original comment by Aldrin.Baroi@gmail.com on 18 Sep 2012 at 7:03

GoogleCodeExporter commented 9 years ago
Closing as fixed.

Original comment by Aldrin.Baroi@gmail.com on 28 Dec 2012 at 10:40