Ok here are the problems: We use serial numbers in this style: JGHO3-X884A-POI8W-WW1JI-BVFRE
When the activation or validation rest API route is accessed, this works fine. When a request is made via our own software and an incorrect serial number is entered, for example the same one without the dashes… such as… JGHO3X884APOI8WWW1JIBVFRE or JGHO3-X884A-POI8W-WW1JI-TYPO1….(with typos) Then it will be rejected. As it should be.
So our customers don’t notice anything. But if the serial numbers are entered incorrectly by customers and the rest-api receives an incorect serial, the website gives PHP errors on the backend and sometimes even critical errors that cause the website to crash temporarily.
2024/02/09 16:12:17 [error] 4379#4379: *387 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Call to a member function getId() on bool in /www/mdomainname_357/public/wp-content/plugins/license-manager-for-woocommerce/includes/Api/V2/Licenses.php:328
Stack trace: 0 /www/mdomainname_357/public/wp-includes/rest-api/class-wp-rest-server.php(1193): LicenseManagerForWooCommerce\Api\V2\Licenses->getLicense(Object(WP_REST_Request)) 1 /www/mdomainname_357/public/wp-includes/rest-api/class-wp-rest-server.php(1041): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/lmfwc/v2/licen…’, Array, NULL) 2 /www/mdomainname_357/public/wp-includes/rest-api/class-wp-rest-server.php(431): WP_REST_Server->dispatch(Object(WP_REST_Request)) 3 /www/mdomainname_357/public/wp-includes/rest-api.php(424): WP_REST_Server->serve_request(‘/lmfwc/v2/licen…’) 4 /www/mdomainname_357/public/wp-includes/class-wp-hook.php(324): rest_api_loaded(Object(WP)) 5 /www/mdomainname_357/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filte” while reading response header from upstream, client: 95.99.77.123, server: domain.com, request: “GET /wp-json/lmfwc/v2/licenses/JGHO3X884APOI8WWW1JIBVFRE?consumer_key=###&consumer_secret=###HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php8.0-fpm-mdomainname.sock:”, host: “domain.com:19605”