Jump to content
Sign in to follow this  

how to block Russian characters in pre-sales subject field

Recommended Posts

Might you know of any sneaky ways, or creative things I can do to stop this?

Can you please tell me how to prevent, block and disable any non-English letters? Specifically, I think it would be great to prevent letters from the Cyrillic script (Russian Alphabet). Literally, every spam ticket I get is from Mother Russia.

I know there is form captcha, but I don't want to use any services related to google or even the baked in WHMCS. The less steps a visitor has to do to get support the better.

Thanks for your time,

Share this post

Link to post
Share on other sites

Perhaps make support tickets for logged in users only (since visitors need only pre-sales "support" I'd guess), and presales tickets use at least CAPTCHA (easily defeated, though).

Share this post

Link to post
Share on other sites
20 minutes ago, bear said:

Perhaps make support tickets for logged in users only (since visitors need only pre-sales "support" I'd guess), and presales tickets use at least CAPTCHA (easily defeated, though).

Anything else come to mind? How do you block non-English letters from the pre-sales contact form that is shown to logged out users?

Yea I agree, CAPTCHA isn't very good and often worthless. The CloudFlare protected websites that display captcha for example are a pain in the butt and i almost always just close the website. Also, I've noticed if you are not using a Chrome browser, you will get SOOOO many more "captcha requests" just b/c you are not using the actual google browser. A joke ehh?


Share this post

Link to post
Share on other sites
48 minutes ago, cdeese8 said:

Anything else come to mind? How do you block non-English letters from the pre-sales contact form that is shown to logged out users?

i'd agree with @bear about making them login first - but if you're not going to do that, then you could edit the contact.tpl template and use a HTML5 pattern...

<input type="subject" name="subject" value="{$subject}" !class="form-control" id="inputSubject" pattern="[^аоуиеёэюяыбвгджзйклмнпрстфхцчшщ]+" oninvalid="this.setCustomValidity('Do not enter Russian characters')" oninput="setCustomValidity('')" />


although in order to make the pattern work, you need to disable the form-control class on the element... that disrupts the styling a bit, but you would just need to recreate the form-control class in a custom.css, call it something else and use that class in this element... the above is tested as working on v7.4.2 (which if you're still using v7.4.1 is the closest dev i've got to it)... JS/jQuery validation hooks could be an alternative too.

Share this post

Link to post
Share on other sites

Friggin brilliant. I remember reading about the pattern just before I went to bed. Thanks for giving that extra oomph of effort and providing a rich response. VERY HELPFUL!!



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By bluesteam
      So I have just signed up with crisp.  My business email address is info@bluesteam.net.  Crisp asks for an email address when signing up and sends you the chat transcripts after the conversation is complete.
      The problem is that Crisp sends these transcripts from some-random-sequence@bluesteam.on.crisp.email
      Now I have piping enabled for info@bluesteam.net for my General Queries Department so I keep getting the transcript opening tickets on the support system.
      NOW I have to go and delete every support ticket that gets opened because blacklisting each email address is pointless because the sequence will always change and never be the same so its useles to blacklist it.
      I want to add a wildcard in the Spam Control System *@bluesteam.on.crisp.email so that NO transcripts can open a ticket but lo and behold, there is no such thing as a wildcard on the Spam Control.
      How can this be?  It's such a simple feature that should be enabled with every spam control system.
      Has anyone got a solution to this?
    • By postcd
      Hello, in WHMCS 6.3 in last days i started receiving significantly higher amount of SPAM support tickets than before. (bot spam not real people)
      So i tried to switch "Captcha Type" from "Default (5 Character Verification Code)" to "reCAPTCHA (Google's reCAPTCHA system)"
      I seen i already had prefilled public and private key there and i verified it is correct/same with keys in my google account where i added my site already.
      But when i open contact form as a non logged in user in Firefox and Tor browser, it does not show up the recaptcha, it shows only:
      When submitting, it says "The characters you entered didn't match the image shown. Please try again."
      Is there any work around/hack (by editting some files) so i can prevent support ticket SPAM?
      The default WHMCS 5 chars. captcha show up, but SPAM bots started going over it.
      In recaptcha account, server side integration URL is: https://www.google.com/recaptcha/api/siteverify
      <script src='https://www.google.com/recaptcha/api.js'></script>
      <div class="g-recaptcha" data-sitekey="PubKeyHere"></div>
      I see my recaptcha is "v2" type\
      Update: The cause of this issue was Content-Security-Policy in .htaccess file that denied google domain.
    • By WHMCS Josh
      An unfortunate trait of the internet is spam and automated bots disseminating that spam. As a business operator on the internet, you may also receive orders submitted in bulk by automated bots. There can be situations where you need to delete lots of clients with the same first name.
      This small script leverages the local API to cleanly delete all clients who match the specified term.
      This script is provided as-is, without warranty, and in the understanding for the potential to permanently and irreversibly delete data. Before running this script, please make a database backup:
      <?php /** * Delete spam clients where the firstname contains 5666Q.COM * using advanced database interaction and the DeleteClient API * * @link https://developers.whmcs.com/advanced/db-interaction/ * @link https://developers.whmcs.com/api-reference/deleteclient/ * * @author WHMCS Limited <development@whmcs.com> * @copyright Copyright (c) WHMCS Limited 2005-2018 * @license https://www.whmcs.com/eula/ WHMCS Eula */ require 'init.php'; use WHMCS\Database\Capsule; // Replace ADMIN_USERNAME with your admin username $adminUsername = 'ADMIN_USERNAME'; echo '<pre>'; // Loop through all clients where firstname contains 5666Q.COM foreach (Capsule::table('tblclients')->where('firstname', 'like', '%5666Q.COM%')->get() as $client) { // Delete the client with DeleteClient API $results = localAPI('DeleteClient', ['clientid' => $client->id], $adminUsername); // Check for errors if ($results['result'] == 'success') { echo "Deleted Client ID: " . $client->id; } else { echo "Error deleting Client ID: " . $client->id; } } echo '</pre>';  
      Begin by entering your adminstrator's username on line 19:
      $adminUsername = 'ADMIN_USERNAME'; Upload the script to your WHMCS directory, and visit in your browser.
      The script will search through all the clients matching the criteria specified in this line:
      'firstname', 'like', '%5666Q.COM%' It will then properly and permanently delete matching clients and associated records.
      The last step is to show which clients are deleted, and if a problem was occurred.
      The file should then be deleted from your server.
      At the time of writing this post, this script was tested on the latest stable release of WHMCS 7.5.1 and should work with any that fall under Active Support as per the LTS schedule here: https://docs.whmcs.com/Long_Term_Support#WHMCS_Version_.26_LTS_Schedule
      If you have any feedback, questions, or concerns that I did not cover in this post, please feel free to reach out!
    • By Subwayhost
      Is it working automatically !
    • By ithaki
      1. I have been trying to add Promotions/Coupons to the spamexperts products in market connect, linked to our various hosting packages. I have done the setup in creating a promotion and no matter what I try I get the following: The promotion code you entered has been applied to your cart but no items qualify for the discount yet - please check the promotion terms
      2. Please let me know if this is a whmcs problem or market connect and also what to do to fix it.
      3. I have also noticed that when you put in the monthly, quarterly, and annual prices on the spamexperts products you only get the monthly price on checking out, even if you have selected yearly for the hosting plan.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated