Our.Umbraco.Honeypot.Core
1.3.1
dotnet add package Our.Umbraco.Honeypot.Core --version 1.3.1
NuGet\Install-Package Our.Umbraco.Honeypot.Core -Version 1.3.1
<PackageReference Include="Our.Umbraco.Honeypot.Core" Version="1.3.1" />
paket add Our.Umbraco.Honeypot.Core --version 1.3.1
#r "nuget: Our.Umbraco.Honeypot.Core, 1.3.1"
// Install Our.Umbraco.Honeypot.Core as a Cake Addin #addin nuget:?package=Our.Umbraco.Honeypot.Core&version=1.3.1 // Install Our.Umbraco.Honeypot.Core as a Cake Tool #tool nuget:?package=Our.Umbraco.Honeypot.Core&version=1.3.1
Our.Umbraco.HoneyPot
A basic Honeypot to trap bots from posting your forms, it can be used with Umbraco Forms or on custom forms. The idea is simple, add a random hidden field, if the field is populated and posted = it's probably a bot.
The logic is based on: https://github.com/usercode/AspNetCore.Honeypot
In computer terminology, a honeypot is a computer security mechanism set to detect, deflect, or, in some manner, counteract attempts at unauthorized use of information systems. Generally, a honeypot consists of data (for example, in a network site) that appears to be a legitimate part of the site which contains information or resources of value to attackers. It is actually isolated, monitored, and capable of blocking or analyzing the attackers. This is similar to police sting operations, colloquially known as "baiting" a suspect.[1]
Install with Umbraco Forms installed (V8, V9, V10)
This will install the Core version and a new field in Umbraco Forms.
V9+: Install-Package Our.Umbraco.Honeypot
V8: Install-Package Our.Umbraco.HoneyPot.V8
OR
V9+: dotnet add package Our.Umbraco.Honeypot
Install without Umbraco Forms (V8, V9, V10)
V8+: Install-Package Our.Umbraco.Honeypot.Core
OR
dotnet add package Our.Umbraco.Honeypot.Core
Usage
In your Umbraco Forms form, you will add the new field "Honeypot Field", the rest is automatic.
Or
Custom usage (.net 5+):
@addTagHelper *, Our.Umbraco.Honeypot.Core
<honeypot-field />
<honeypot-time />
Validation:
[HttpPost]
public async Task<IActionResult> Form(FormModel model)
{
if (HttpContext.IsHoneypotTrapped())
{
//Log error
return View("Form", model);
}
}
Global settings
"Our.Umbraco.Honeypot": {
"HoneypotEnableFieldCheck": true,
"HoneypotEnableTimeCheck": true,
"HoneypotPrefixFieldName": "hp_",
"HoneypotSuffixFieldName": "",
"HoneypotTimeFieldName": "__time",
"HoneypotMinTimeDuration": "00:02:00",
"HoneypotFieldStyles": "display: none !important; position: absolute !important; left: -9000px !important;",
"HoneypotFieldClass": "hp-field",
"HoneypotFieldNames": [ "Name", "Phone", "Comment", "Message", "Email", "Website" ],
"HoneypotMessage": "Something went wrong (HP)"
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- UmbracoCms.Core (>= 8.7.1)
- UmbracoCms.Web (>= 8.7.1)
-
net5.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Options (>= 5.0.0)
- Umbraco.Cms.Core (>= 9.0.0)
-
net6.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- Umbraco.Cms.Core (>= 10.0.0)
-
net7.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Options (>= 7.0.0)
- Umbraco.Cms.Core (>= 11.0.0 && < 13.0.0)
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Options (>= 8.0.0)
- Umbraco.Cms.Core (>= 13.0.0 && < 15.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Our.Umbraco.Honeypot.Core:
Package | Downloads |
---|---|
Our.Umbraco.Honeypot
Our.Umbraco.Honeypot |
|
Our.Umbraco.Honeypot.V8
Our.Umbraco.Honeypot.V8 |
GitHub repositories
This package is not used by any popular GitHub repositories.