unosquare/passcore

Could not verify you are not a robot

psyhello opened this issue · 4 comments

Hi! I have an issue with changing the password of users. I fill full form and when i click "change password", passcore says "Could not verify you are not a robot". But after that popups the window, that password changed.

PassCore Server

  • OS: [Windows 2019 server]

  • Provider: [Active Directory]

  • Settings file (
    {"Logging": {
    "IncludeScopes": false,
    "LogLevel": {
    "Default": "Debug",
    "System": "Information",
    "Microsoft": "Information"
    }
    },
    "WebSettings": {
    "EnableHttpsRedirect": true
    },
    "AppSettings": {
    // The following options for AD Provider (remove if you don't use this Provider)
    "UseAutomaticContext": true, // Set true to allow PassCore to reset password using the same credentials, or false if you will fill the credentials below
    "RestrictedADGroups": [

    ], // Set the AD groups to restrict the use of PassCore
    "AllowedADGroups": [], // Set the AD Groups to allow PassCore, if the array is empty all the groups no-restricted above are allowed
    "IdTypeForUser": "UPN", // Possible values are "DN", "GUID", "Name", "SAM", "SID" and "UPN" (Default UPN)
    "UpdateLastPassword": false, // Set true to allow PassCore to update the last password timestamp
    // The following options are for LDAP Provider (remove if you don't use this Provider)
    "LdapSearchBase": "ou=people,dc=example,dc=com",
    "LdapSecureSocketLayer": false, // Default for AD is true when using LDAPS 636
    "LdapStartTls": false, // Default for AD is true when using LDAP 389
    "LdapChangePasswordWithDelAdd": true,
    "LdapSearchFilter": "(sAMAccountName={Username})", // Another value: "(&(objectClass=person)(cn={Username}))"
    // General options (valid for both providers)
    "LdapHostnames": [ "" ], // Set your hostname(s)
    "LdapPort": 389, // Default for AD is 389, for LDAPS 636
    "LdapUsername": "", // Set the username or distinguish name (DN) to bind the LDAP server
    "LdapPassword": "", // Set the password for the username
    "DefaultDomain": "" // Set your default AD domain here, or non "@" logins will not work! Use empty value to allow user to set the domain. This option is ONLY available with UPN.
    },
    "ClientSettings": {
    "ValidationRegex": {
    "EmailRegex": "^[a-zA-Z0-9.!#$%&’+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)$",
    "UsernameRegex": "^[a-zA-Z0-9._-]{3,20}$"
    },
    "UsePasswordGeneration": false, //Set true to let PassCore create a new password for the current account. If true the user can not customize its new password.
    "PasswordEntropy": 16, // the number of bytes of entropy to use for generated passwords
    "ShowPasswordMeter": true,
    "MinimumScore": 0, //The minimum acceptable score that the user's new password needs to get at being evaluated by ZXCVBN to be established as the new password.
    "Recaptcha": {
    "SiteKey": "recaptcha_site_key", // ReCAPTCHA public key: replace this! or leave empty if you don't need ReCAPTCHA
    "PrivateKey": "recaptcha_private_key", // ReCAPTCHA private key: replace this! or leave empty if you don't need ReCAPTCHA
    "LanguageCode": "ru"
    }):

What information did you need from log file?

In log file i see that

info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[3]

     Route matched with {action = "Post", controller = "Password"}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Post(Unosquare.PassCore.Web.Models.ChangePasswordModel) on controller Unosquare.PassCore.Web.Controllers.PasswordController (Unosquare.PassCore.Web).

warn: Unosquare.PassCore.Web.Controllers.PasswordController[0]

     Invalid Recaptcha

System.InvalidOperationException: Invalid Recaptcha response

  at Unosquare.PassCore.Web.Controllers.PasswordController.Post(ChangePasswordModel model) in C:\Unosquare\passcore\src\Unosquare.PassCore.Web\Controllers\PasswordController.cs:line 95

info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]

     Executing ObjectResult, writing value of type 'Unosquare.PassCore.Web.Models.ApiResult'.

info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2]

     Executed action Unosquare.PassCore.Web.Controllers.PasswordController.Post (Unosquare.PassCore.Web) in 33.4012ms

info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]

     Executed endpoint 'Unosquare.PassCore.Web.Controllers.PasswordController.Post (Unosquare.PassCore.Web)'

info: Microsoft.AspNetCore.Hosting.Diagnostics[2]

     Request finished in 34.1502ms 400 application/json; charset=utf-8

warn: Unosquare.PassCore.Web.Controllers.PasswordController[0]

     Invalid Recaptcha

System.InvalidOperationException: Invalid Recaptcha response

  at Unosquare.PassCore.Web.Controllers.PasswordController.Post(ChangePasswordModel model) in C:\Unosquare\passcore\src\Unosquare.PassCore.Web\Controllers\PasswordController.cs:line 95

info: Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor[1]

I'm having the exact issue with reCAPTCHA on Windows Server 2019 with password change succeeding.

Yep. Password change succeed every time. But each time i have small pop-up with error

Rolled back to version 4.2.3 Problem solved. @j2020h If you have same issue try to install previous version of passcore