Addon:
Helps to stop URL Spammers using your Contact Form etc
Download:
viewtopic.php?f=28&t=279
--
Testing on 1.0.8.21, allowed a customer to register with http://i-am-a-spammer.com
s07e04 - Help stop URL Spammers QUESTIONS/SUPPORT
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: s07e04 - Help stop URL Spammers
Maybe in includes/hooks/shop/siteWide/attr.php
Code: Select all
<script>$('#inputFirstName, #inputLastName, #inputFromName').attr('pattern', '^[^:/.]+$');</script>-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
- burt
- Core Team
- Posts: 4546
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: s07e04 - Help stop URL Spammers
Strange how that stopped working.
Try:
Image:
This should stop any name with ":/" as part of it. It would not stop (eg) www.i-am-a-spammer.com
It would also need to be thoroughly tested to ensure that real names are let through. I can't imagine anyone has a name with :/ in it?
Caveat that this attribute is added by javascript so would only work with .js turned on. Lots of people (myself included) browse with .js turned off by default. If someone wanted it to work without .js, it would just mean overriding the relevant customer_data modules and inserting a pattern, something like [note I have not tried this but it should work];
Try:
Code: Select all
$('#inputFirstName, #inputLastName, #inputFromName').attr('pattern', '(?!.*:/.*).*');
It would also need to be thoroughly tested to ensure that real names are let through. I can't imagine anyone has a name with :/ in it?
Caveat that this attribute is added by javascript so would only work with .js turned on. Lots of people (myself included) browse with .js turned off by default. If someone wanted it to work without .js, it would just mean overriding the relevant customer_data modules and inserting a pattern, something like [note I have not tried this but it should work];
Code: Select all
$input = new Input('firstname', [
'id' => $input_id,
'autocomplete' => 'given-name',
'placeholder' => ENTRY_FIRST_NAME_TEXT,
'minlength' => ENTRY_FIRST_NAME_MIN_LENGTH,
'pattern' => '(?!.*:/.*).*',
]);You do not have the required permissions to view the files attached to this post.