Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7432825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:31:11+00:00 2026-05-29T09:31:11+00:00

So James Patterson keeps trying to hack my website! Okay, not really, but he

  • 0

So James Patterson keeps trying to hack my website! Okay, not really, but he has written quite a few books that have titles starting with “Kill” which triggers a HTTP 501/HTTP 505 from our server side firewall.

Here’s the situation, our Library Software generates a weekly email report all of the new books added to the collection in the last week. I’ve made a form (using php/html) where we can C&P this data in and it will transform it into a nice little page showing off our new titles. Once the form is submitted I sanitize the data before it’s added to a MySQL database. The “Kill” trigger happens before the data from the form can be passed and processed. The data comes in the format:

Kill shot : an American assassin thriller / Vince Flynn|Flynn, Vince|2012|9781416595205 (hbk.)|NEWBKSHELF|20120207| 

I think the way to do this would be a little bit of javascript that changed every instance of kill to something innocuous and then change it back when I am inserting it into the MySQL db.

However there can be hundreds of entries like the one above, and I’m not very good with javascript, and I’m not sure the how to accomplish the first half of this (eg changing every instance of kill to kxll and Kill to Kxll.) I am fairly confident that when I save the data I can safely change kxll back.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:31:12+00:00Added an answer on May 29, 2026 at 9:31 am

    You should hook into the onSubmit() of the form, then check every field, and then replace the value of the submitted field when it contains kill. Best this is done with JQuery, for example

    $(function() {
        $("#formid").bind("submit", function(event) {
            $('input')
            .filter(function(){return $(this).val().indexOf("kill") !== false;})
            .each( function(index,element) {
                $(this).val($(this).val().replace(/kill/i, "kxll"));
            });
        });
    });
    

    Demo here: http://jsfiddle.net/49psu/4/

    You might want to use $('input[value*="kill"]') and .replace(/kill/ig, "kxll") if you want to catch ‘kill’ anywhere in the inputs.

    For more info:

    http://api.jquery.com/each/

    http://api.jquery.com/bind/

    http://api.jquery.com/submit/

    http://w3schools.com/jsref/jsref_replace.asp (javascript replace)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect to James server localhost, but I'm getting an exception javax.mail.MessagingException:
I'm trying to connect to james server using imap protocol, but I'm getting following
I was trying to send mail to my gmail id using apche james but
I'm developing a site which has urls like this: site.com/james site.com/james/photos Schema for this
Example: names = ['James John', 'Robert David', 'Paul' ... the list has 5K items]
I am trying to extend the JSON.net example given here http://james.newtonking.com/projects/json/help/CustomCreationConverter.html I have another
I'm trying to decide whether to use James( http://james.apache.org/ ) or Javamail( http://java.sun.com/products/javamail/ )
In this blogpost by James Iry , he writes: Plus, Scala has an option
I just installed JAMES (Java Apache Mail Enterprise Server) and I am trying to
I am trying to send email using apache james with this code public static

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.