406 Error with particular string of characters

Status
Not open for further replies.

tjost

New Member
Messages
3
Reaction score
0
Points
1
Hello,

I am new to the forums here and have had great experience with x10hosting so far. One of the better free hosts I've been on aside from the heavy restrictions set on the servers here. I am experiencing an error with a particular post and am posting for support as I believe the issue may be on the server side at this point.

I run a fully updated version of WordPress and when trying to write a post with this particular segment of code (a tutorial about a simple ANSI C application) I receive a 406 Not Acceptable error. Here's the offending code:

Code:
void kpid() {        // void function to remedy compile warning.

    FILE *p;    // assign pointer p

    p = popen("killall vlc", "r"); // kill process named vlc
    if(!p) {            // if process does not exist, error and exit.
        fprintf(stderr, "Error.");
        exit(1);
    }
    pclose(p);

}

Anyone that is even medially proficient in even php can see this segment of code is not malicious, in fact it's oriented specifically to function only on Linux and it cannot be executed server side unless it's compiled. Even still, without the full code, this function is absolutely benign. Either way, the server throws a Not Acceptable error. I've confirmed this as I run a server on localhost which does not throw the error when attempting to save a draft or publish the post. Through searching on WordPress forums, the most common fix is to add this:

Code:
<ifmodule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</ifmodule>

To .htaccess in the wp-admin directory. This has not fixed the issue on my x10host site and now I come to this fine community to inquire if there's anything I can do to remedy this situation. I've also reviewed the thread about the fixes done in September and what is allowed to be put in .htaccess so I'm assuming that's why the common fix doesn't work here. Is my only option to post images of the code snippets instead? I would rather avoid that as being able to copy and past the code instead is something most people expect from tech blogs.

Thank you for any assistance you can offer.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
I'm assuming that's why the common fix doesn't work here.
while x10hosting discourage it - Premium account users have the ability to completely disable [ mod_security ] on their account via cPanel

For free-hosting accounts - x10hosting has a customized web server setup that does not allow for the same cPanel functionality to disable all or part of [ mod_security ] - x10hosting also decided it would not be a good idea to allow free-hosting users to disable any of it - as it is used to not only protect against inbound malicious attacks but to prevent outbound abuse also - Unfortunately free-hosting still gets abusive signups - and allowing those abusive users to disable something that helps to prevent their malicious actions would not be in x10hosting's best interest
 

tjost

New Member
Messages
3
Reaction score
0
Points
1
That's completely understandable, I've often wondered how free hosting providers protect themselves against malicious users.

On another note, I am now catching a 403 error on the entire domain with an additional 404 error. After some searching, could my having attempted that known fix triggered the server rules to deny access? I've since removed that .htaccess from the server after it didn't have the desired effect.
 
Status
Not open for further replies.
Top