Welcome to Geeklog, Anonymous Thursday, December 08 2022 @ 09:50 pm EST

Geeklog Forums

SpamX not adding entry


Status: offline

deepak1155

Forum User
Chatty
Registered: 01/15/08
Posts: 35
Hi to all,

I am using geeklog 1.4.1. In my spamx's

HTTP Header Blacklist,
IP Blacklist,
IP of URL Blacklist,
Edit SLV Whitelist


I want to add some entry in above topics, but I am unable to do so. Please anyone tell me why this happening.


Thanks
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Which language file are you using? There's a known issue with Spam-X and French, for example. It may affect other languages with special characters in the button texts as well.

bye, Dirk
 Quote

Status: offline

deepak1155

Forum User
Chatty
Registered: 01/15/08
Posts: 35
Quote by: Dirk

Which language file are you using? There's a known issue with Spam-X and French, for example. It may affect other languages with special characters in the button texts as well.

bye, Dirk








Yes Dirk, I am using "french_france" language file. Is the language file is cause of problem. If it, then how can I resolve this problem. Please guide me.
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
The problem is COM_applyFilter cuts off anything after an apostrophe (among other symbols). So the text "Ajouter l'entrée" in LANG_SX00['addentry'] fails to compare against "Ajouter l". The simplest fix is to change $LANG_SX00['addentry'] to something without special chars in it.

Text Formatted Code
//The proper fix is to change this line (86) in plugins/spamx/EditHeader.Admin.class.php:

        $display .= '<p><input type="Submit" name="paction" value="' . $LANG_SX00['addentry'] . '">';

//to

        $display .= '<p><input type="Submit" name="addentry" value="' . $LANG_SX00['addentry'] . '">';

//add this after line 39

        } else if (isset ($_POST['addentry'])) {
            $action = 'addentry';
        } // this is the old line 40
 


And then you have to make similar changes in all the similar spamx modules (and in various other places in Geeklog where COM_applyFilter is overly strict).
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The fix we have in CVS is to remove the COM_applyFilter for $_GET['action'] and $_POST['action'] in all the modules who's names start with "Edit". There's no need to filter that string since it's only compared to a fixed string (from the language file) anyway.

bye, Dirk
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
In the older code where you get comparisons like $mode == $LANG03[32], I think isset($_POST['addentry']) is better because it is self-documenting. OTOH, $LANG_SX00['addentry'] is no less self-documenting I guess.
 Quote

Status: offline

deepak1155

Forum User
Chatty
Registered: 01/15/08
Posts: 35
Quote by: Dirk

The fix we have in CVS is to remove the COM_applyFilter for $_GET['action'] and $_POST['action'] in all the modules who's names start with "Edit". There's no need to filter that string since it's only compared to a fixed string (from the language file) anyway.

bye, Dirk




Yes, now it is working. Thanks Dirk, you are greate.
 Quote

All times are EST. The time is now 09:50 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content