From 2f956877446197ec2a747ec4474813b16297707d Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Mon, 4 Mar 2024 10:04:33 -0800 Subject: [PATCH] fix cf_turnstile_verify.php location call --- plugin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.php b/plugin.php index 799b28b..4ab6e58 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ Plugin Name: Cloudflare Turnstile for YOURLS Admin Plugin URI: https://github.com/sophiaatkinson/yourls-cloudflare-turnstile Description: Adds Cloudflare Turnstile to the YOURLS Admin login. -Version: 1.0 +Version: 1.0a Author: Sophia Atkinson Author URI: https://sophia.wtf */ @@ -42,7 +42,7 @@ function cf_turnstile_inject_script() { document.getElementById(\'cfTokenInput\').value = token; // Send the token to the verification script var xhr = new XMLHttpRequest(); - xhr.open("POST", "' . yourls_plugin_url('cf_turnstile_verify.php') . '", true); + xhr.open("POST", "' . yourls_plugin_url(__DIR__ . '/cf_turnstile_verify.php') . '", true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.onreadystatechange = function() { if (xhr.readyState === XMLHttpRequest.DONE) {