• WordPress Version 4.8.1
    iThemes Security Version 6.4.0

    I have over 3900 lines of IPs, which I enter in the Banned?Users?>?Ban?Hosts?box. Since about/over a week, I am observing that whenever I update the IPs, the .htaccess file gets truncated after the last line of iThemes.

    This is how the .htaccess starts:

    # BEGIN iThemes Security - Do not modify or remove this line
    .. all your code of IPs ..
    # END iThemes Security - Do not modify or remove this line
     
    all other default content

    All the other default content (or my custom code) that is present in the .htaccess file gets deleted after your last line – # END iThemes Security – Do not modify or remove this line.

    This weird think is happening in over 20 WP installations.

    Before submitting this issue, I updated the Ban Hosts of 27 websites with 3936 lines of IPs.
    24 sites had the same problem.
    3 sites didn’t have any problem.

    (Note: A week ago when I noticed this problem, the number of lines of IPs was a little over 3800. So, 3936 is not some magic figure resulting in this problem.)

    I re-updated these 3 sites with 3935 lines of IPs (not 3936 because I deleted the last IP before saving).
    They had the same problem as others.
    I copied the deleted (default) content of .htaccess in all of them.

    I re-updated these 3 sites with 3936 lines of IPs.
    These sites again had the same problem.

    All the .htaccess files resulted in a size of 1001 KB (in which the default content had been automatically deleted).

    FYI: I have also enabled HackRepair.com’s blacklist feature on all the websites.

    Could this be happening due to the long execution time of updating & saving the large .htaccess file, which is nearly 1 MB in size?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Vinayy

    (@vinayy)

    Can you please do something about this?

    Whenever I update IPs in Ban Hosts, WHY is the .htaccess file getting truncated after your last line?

    This ..

    # BEGIN iThemes Security - Do not modify or remove this line
    .. all your code of IPs ..
    # END iThemes Security - Do not modify or remove this line
     
    all other default content

    Changes to ..

    # BEGIN iThemes Security - Do not modify or remove this line
    .. all your code of IPs ..
    # END iThemes Security - Do not modify or remove this line
    

    WHY?

    Such a thing wasn’t happening earlier!!

    Every time I update the Ban Hosts list, I have to log in through FTP and physically go and update the .htaccess file by copying back the code that iThemes deleted from .htaccess. ??

    Thread Starter Vinayy

    (@vinayy)

    hmm .. Still no response! ??

    Anyway, I deleted all the IPs from Ban Hosts and saved the setting and it resulted in a .htaccess file of 13 KB. Now, this too did not have the other content of the .htaccess file as this time also the .htaccess file got truncated after your last line.

    So, this means that the number of IPs or the size of the .htaccess file is not responsible for the file getting truncated. It means that your plugin has a bug.

    This ..

    # BEGIN iThemes Security - Do not modify or remove this line
    .. all your code of IPs ..
    # END iThemes Security - Do not modify or remove this line
     
    all other default content

    Changed to ..

    # BEGIN iThemes Security - Do not modify or remove this line
    .. all your code except IPs of Ban Hosts..
    # END iThemes Security - Do not modify or remove this line
    ?

    It means that your plugin has a bug which deletes everything after your last line.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘.htaccess gets truncated after updating Banned Users IPs’ is closed to new replies.