bbAntiSpam: Discuss how to stop web spam

The forum is retired.

bbAntiSpam Forum Index - Advanced Textual Confirmation - Not working with File Field?

Author Message

Posted: Thu Dec 10, 2009 7:55 am    Post subject: Not working with File Field?  

I guess it's not working with my form which tries to upload file. it works well when bbAntiSpam removed.


<form id="form1" name="form1" enctype="multipart/form-data" method="post" action="">
  <input type="file" name="imagefile" />

Error after Visual confirmation :
[phpBB Debug] PHP Notice: in file /upload.php on line 68: Undefined index: imagefile
Site Admin

Joined: 18 Apr 2006
Posts: 805
Location: Saint-Petersburg, Russia

Posted: Fri Dec 11, 2009 4:27 am    Post subject:  

Unfortunately yes, an intermediate question breaks file uploading. Solutions:

1) Answer a question before uploading files

2) Disable Advanced Textual Confirmation for uploading files. I don't know exactly how to do it, but probably the following might work. In the file "bbantispam.php", after
if ($_SERVER['REQUEST_METHOD'] != 'POST') { return; }

add a line
if (false === strpos($_SERVER['REQUEST_URI'], 'upload.php')) { return; }

Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development!