[XI] License Validation

[XI] License Validation 1.0.3

No permission to download
:D Quick fix for this ;)
Open file: XI_LicenseValidation_ControllerPublic_License
Add this lines:
PHP:
protected function _preDispatch($action) {
        $this->_assertRegistrationRequired();
    }
After you edit code should be:
PHP:
class XI_LicenseValidation_ControllerPublic_License extends XenForo_ControllerPublic_Abstract
{
    protected function _preDispatch($action) {
        $this->_assertRegistrationRequired();
    }
.........
 
:D Quick fix for this ;)
Open file: XI_LicenseValidation_ControllerPublic_License
Add this lines:
PHP:
protected function _preDispatch($action) {
        $this->_assertRegistrationRequired();
    }
After you edit code should be:
PHP:
class XI_LicenseValidation_ControllerPublic_License extends XenForo_ControllerPublic_Abstract
{
    protected function _preDispatch($action) {
        $this->_assertRegistrationRequired();
    }
.........
http://xenforo.com/community/threads/xi-license-validation.50497/page-2#post-569322

as i said 4 months ago but never updated addon :hmm:
 
Jeremy updated [XI] License Validation with a new update entry:

Bug Fixes

This update provides primarily bug fixes and fixes the following items:
  • Access to the verification system requires the user to be logged in.
  • The add-on now removes records added to the database when the user group is added. Note: This does not remove the user from the validation group.
v1.0.2 also brings the minimum required version from 1.0.x to 1.2.x and utilizes Template Modifications. As such, the following files should be removed from when you upload the update:...

Read the rest of this update entry...
 
Hi Jeremy,

Is possible to display fields validation token and license domain during user registration and if these are incorrect deny registration.

Thanks luis.
 
Having a bit of an odd issue. We've just reinstalled this add-on and when i tested it I get something along the lines of "license cannot be validated at this time" so I decided to look into what the issue may be and ran a var_dump on $request in the License controller inside of actionValidate and this is the response it's getting from the XenForo API:

Code:
object(Zend_Http_Response)#139 (5) {
["version":protected]=>
string(3) "1.1"
["code":protected]=>
int(500)
["message":protected]=>
string(21) "Internal Server Error"
["headers":protected]=>
array(6) {
["Server"]=>
string(5) "nginx"
["Date"]=>
string(29) "Sat, 04 Jul 2015 06:05:17 GMT"
["Content-type"]=>
string(31) "application/json; charset=UTF-8"
["Content-length"]=>
string(3) "475"
["Connection"]=>
string(5) "close"
["Last-modified"]=>
string(29) "Sat, 04 Jul 2015 06:05:17 GMT"
}
["body":protected]=>
string(475) "{"error":["This action is available via POST only. Please press the back button and try again."],"templateHtml":"\n\n<div class=\"errorOverlay\">\n\t<a class=\"close OverlayCloser\"><\/a>\n\t\n\t\t<h2 class=\"heading\">The following error occurred<\/h2>\n\t\t\n\t\t<div class=\"baseHtml\">\n\t\t\n\t\t\t<label for=\"ctrl_0\" class=\"OverlayCloser\">This action is available via POST only. Please press the back button and try again.<\/label>\n\t\t\n\t\t<\/div>\n\t\n<\/div>"}"
}

Which is odd, because it is definitely a POST request being sent from your Add-on.

This is a var_dump of $validator in the same method:

Code:
object(Zend_Http_Client)#141 (15) {
["config":protected]=>
array(12) {
["maxredirects"]=>
int(5)
["strictredirects"]=>
bool(false)
["useragent"]=>
string(16) "Zend_Http_Client"
["timeout"]=>
int(10)
["adapter"]=>
string(31) "Zend_Http_Client_Adapter_Socket"
["httpversion"]=>
string(3) "1.1"
["keepalive"]=>
bool(false)
["storeresponse"]=>
bool(true)
["strict"]=>
bool(true)
["output_stream"]=>
bool(false)
["encodecookies"]=>
bool(true)
["rfc3986_strict"]=>
bool(false)
}
["adapter":protected]=>
NULL
["uri":protected]=>
object(Zend_Uri_Http)#20 (9) {
["_username":protected]=>
string(0) ""
["_password":protected]=>
string(0) ""
["_host":protected]=>
string(11) "xenforo.com"
["_port":protected]=>
int(80)
["_path":protected]=>
string(24) "/api/license-lookup.json"
["_query":protected]=>
string(0) ""
["_fragment":protected]=>
string(0) ""
["_regex":protected]=>
array(5) {
["escaped"]=>
string(16) "%[[:xdigit:]]{2}"
["unreserved"]=>
string(24) "[A-Za-z0-9-_.!~*'()\[\]]"
["segment"]=>
string(54) "(?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\]:@&=+$,;])*"
["path"]=>
string(66) "(?:\/(?:(?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\]:@&=+$,;])*)?)+"
["uric"]=>
string(56) "(?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\];\/?:@&=+$,])"
}
["_scheme":protected]=>
string(4) "http"
}
["headers":protected]=>
array(0) {
}
["method":protected]=>
string(4) "POST"
["paramsGet":protected]=>
array(0) {
}
["paramsPost":protected]=>
array(2) {
["token"]=>
string(32) "****removed****"
["domain"]=>
string(0) ""
}
["enctype":protected]=>
string(33) "application/x-www-form-urlencoded"
["raw_post_data":protected]=>
NULL
["auth":protected]=>
NULL
["files":protected]=>
array(0) {
}
["cookiejar":protected]=>
NULL
["last_request":protected]=>
NULL
["last_response":protected]=>
NULL
["redirectCounter":protected]=>
int(0)
}

Jake
 
@Jake B.
Find:
PHP:
        $validator = XenForo_Helper_Http::getClient('http://xenforo.com/api/license-lookup.json');
Replace with:
PHP:
        $validator = XenForo_Helper_Http::getClient('https://xenforo.com/api/license-lookup.json');
maybe @Jeremy should update the resource
 
What he said. I just haven't downloaded and repackaged it.

I have a modified version running for my own needs so I can't repackage what I have. Lol
 
Top Bottom