Author: Chris1278
Extension description: Name der Extension: Spamsecure by 69bruno
Autor: 69bruno
CO-Autor: Chris1278
Version der Extension: 1.0.6
Requirements:
- phpbb 3.2.10 and higher
- php 7.0 +
Description of the extension
This extension can be used to intercept posts, requests via the contact form (original and contactadmin) and to check for certain requirements.
Since the expansion has changed a lot, I'll rewrite this description again.
The extension is divided into two areas.
1st area: Settings for illegal characters/strings
This area can be used, for example, to check for special characters or character strings. The following options can be selected as presets:
- Forbid Cyrillic Characters
If selected, the posts will be checked for them before they are sent and if there are Cyrillic characters in the message, the user will receive a corresponding error message.
- Forbid Chinese characters
If selected, the posts will be checked for them before they are sent and if there are Chinese characters in the message, the user will receive a corresponding error message.
- Forbid Hindi characters
If selected, the posts will be checked for them before they are sent and if there are Hindi characters in the message, the user will receive a corresponding error message.
- Enable custom input
When you activate this function, you can then enter the terms or character strings in the input line that are not covered by the three previous options.
You can also use Custom input to disable links when you enter http or www.
Example of input and input format
The characters are to be entered as follows, regardless of whether they are uppercase or lowercase:
1,d,http,ftp
With this example, an error message would be triggered if a
1
or a d
or http
or www
occurs in the post. However, if you only use an h or a w in a word, no error message would be triggered.Example:
Hans finds 1 bill.
<- Errorhttp://meinedomain.de
<- errorI have a car.
There is a h
in it, but since http is the value between the commas, an error message would only be triggered if the character string was complete.If an error message is triggered, the user receives the following error message:
The message contains the following number of illegal characters/strings: (number)
Whereby he is also immediately shown how many characters or how many character strings he has wrong.
- Display of "invalid characters/characters" in the error message
Here you can choose whether you would like to show the user the characters that he is not allowed to use. When activated, the following is then displayed to the user in a line below the error message: The following characters/character strings are not permitted:, followed by the characters/character strings that are not permitted. Whereby you can of course also control up to how many characters you want to display as a maximum.
- Option for the counter of "forbidden characters"
Here you can set the value of how many characters that the user has used incorrectly are displayed.
2sec area: Settings check by "Regex" coding
- Forbid Links
If you activate this, it is checked whether there are links in the article/post to be written and, if the result is positive, it is prevented with a corresponding error message.
- Custom regex code:
Here you can prohibit entire terms and expressions that you have to enter taking into account the full regex code.
Example:
A simple example would be: /http:|ftp: |www:/
A complex example would be: /(((http| https):\/\/)|(www\.))[a-zA-Z0-9\-\.]+\ .[a-zA-Z]{2,}(:[0-9]+)?(\/\S*)?/
Warning: For security reasons, the transmission to the database is not carried out if the regex code is incorrect.
Tested on phpBB version: 3.3.12
Download file: bruno.zip
File size: 33.47 KiB
Extension overview page: View
Except where otherwise noted, the phpBB Team is not responsible nor required to provide support for this extension. By installing this extension, you acknowledge that the phpBB Support Team or phpBB Extension Customisations Team may not be able to provide support.
-->Extension support<--