1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice
What Do You Need In The Xf2 Xengallery Version? Vote for your choices here: http://www.sonnb.com/threads/what-do-you-need-in-the-xf2-xengallery-version.1539/

Bug With Guest Users

Discussion in 'Bug Reports' started by Adonis Figueroa, Mar 25, 2013.

  1. Adonis Figueroa

    Adonis Figueroa New Member

    Hi, I'm a techspot.com developer, we are using your addon "sonnb - Stop Spam Here" but I think there is a bug in this addon, if you post in a thread like 'Guest' user, the addon don't validate it. It's related to the register date in the sonnbStopSpamHere_Model_SSH class:

    $this->visitor['register_date'] - strtotime('- '.$this->options->sonnbStopSpamHere_linkDisabledJoinDate.' days') > 0

    $this->visitor['register_date'] - strtotime('- '.$this->options->sonnbStopSpamHere_keywordDisabledJoinDate.' days') > 0

    $this->visitor['register_date'] - strtotime('- '.$this->options->sonnbStopSpamHere_post_disabledJoinDate.' days') > 0

    To a guest user, the register_date is always '0', then the 3 lines return a negative number.
     
  2. Adonis Figueroa

    Adonis Figueroa New Member

    BTW the solution could be:

    Change it:
    $this->options->sonnbStopSpamHere_linkDisabledJoinDate &&
    $this->visitor['register_date'] - strtotime('- '.$this->options->sonnbStopSpamHere_linkDisabledJoinDate.' days') > 0

    By:
    $this->options->sonnbStopSpamHere_linkDisabledJoinDate &&
    (
    !$this->visitor['register_date'] ||
    ($this->visitor['register_date'] - strtotime('- '.$this->options->sonnbStopSpamHere_linkDisabledJoinDate.' days') > 0)
    )

    And the same in the other validations.
     
  3. sonnb

    sonnb Administrator Staff Member

    Hello Adonis,

    Thank for reporting. It rarely to see someone is allowing Guest to post content but anyway it would be fixed.
     
  4. Adonis Figueroa

    Adonis Figueroa New Member

    Thank you for considering our bug.

    We have this problem because we allow post in (only some) sections without register, then we need protect us from spammers.
     
  5. sonnb

    sonnb Administrator Staff Member

    This issue was fixed in 1.2.4
     
Tags: bug

Share This Page