Extensions and version-check (w/ github)

Discussion forum for Extension Writers regarding Extension Development.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2813
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Extensions and version-check (w/ github)

Post by kasimi » Fri Feb 09, 2018 6:36 pm

3Di wrote:
Fri Feb 09, 2018 5:32 pm
I use github's gh-pages FWIW
Yes, gh-pages work fine for me, too (my bad, they don't, same issue there), but my version checks use github.io.
Crizzo wrote:
Fri Feb 09, 2018 5:19 pm
Github deactivated tls 1.1. Maybe that is the problem.
That's good to know. It does seem to be an issue with the TLS version:

When I run openssl s_client -tls1_1 -connect kasimi.github.io:443, I'm seeing the same errors as found in the Apache logs. When I run it with -tls-1_2 everything is fine. So the question is, why is fsockopen with tls:// using TLS 1.1 and not 1.2?

User avatar
Crizzo
Translations & International Support Teams Manager
Translations & International Support Teams Manager
Posts: 745
Joined: Thu Apr 23, 2009 1:20 pm
Location: Germany
Name: Christian
Contact:

Re: Extensions and version-check (w/ github)

Post by Crizzo » Fri Feb 09, 2018 6:44 pm

I don't know. But here is the blog post: https://github.com/blog/2498-weak-crypt ... val-notice
My extensions for phpBB: crizzo.de
German phpBB Support at www.phpbb.de

User avatar
3Di
Registered User
Posts: 12550
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di » Fri Feb 09, 2018 6:50 pm

kasimi wrote:
Fri Feb 09, 2018 6:36 pm
es, gh-pages work fine for me, too, but my version checks use github.io.
I am using github.io as well but jsons are into a folder in the gh-pages, example

Code: Select all

"version-check": {
	"host": "3d-i.github.io",
	"directory": "/site/vchecks",
	"filename": "hlposts-vcheck.json"
}
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2813
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Extensions and version-check (w/ github)

Post by kasimi » Fri Feb 09, 2018 9:45 pm

@3Di, I can't fetch your version check file. The output of this script is Error: '' (0)

Code: Select all

<?php

$host = '3d-i.github.io';
$path = '/site/vchecks/hlposts-vcheck.json';
$port = 443;
$timeout = 10;

$fp = fsockopen("tls://$host", $port, $errno, $errstr, $timeout);

if (!$fp)
{
	echo "Error: '$errstr' ($errno)";
}
else
{
	$out = "GET $path HTTP/1.1\r\n";
	$out .= "Host: $host\r\n";
	$out .= "Connection: Close\r\n\r\n";

	fwrite($fp, $out);
	fclose($fp);
	
	echo 'All good';
}

User avatar
3Di
Registered User
Posts: 12550
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di » Fri Feb 09, 2018 9:54 pm

@kasimi, here is my json

Code: Select all

{
	"stable": {
		"1.0": {
			"current": "1.0.1-beta",
			"download": "",
			"announcement": "",
			"eol": null,
			"security": false
		}
	}
}
all of my extensions are throwing no errors at all, example of the above
.
Image

.
Image
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
3Di
Registered User
Posts: 12550
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di » Fri Feb 09, 2018 10:33 pm

You may try with cUrl, on the fly (not tested)

Code: Select all

<?php

		$curl_url = '3d-i.github.io/site/vchecks/hlposts-vcheck.json';

//		$curl_url = 'http://3d-i.github.io/site/vchecks/hlposts-vcheck.json';
//		$curl_url = 'https://3d-i.github.io/site/vchecks/hlposts-vcheck.json';

		$curl_handle = curl_init();
		curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 10);
		curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($curl_handle, CURLOPT_URL, $curl_url);
		$curl_response = curl_exec($curl_handle);
		$curl_code	= curl_getinfo($curl_handle, CURLINFO_HTTP_CODE);
		if ( ($curl_code !== 200) || (!$curl_response) )
		{		
			// error report here
		}
		else
		{
			$json_response = json_decode($curl_response, true);
		}
		var_dump($json_response);
		
$curl_response is the result
$curl_code is the HTTP error code, if any
Last edited by 3Di on Fri Feb 09, 2018 10:57 pm, edited 3 times in total.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 2813
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Extensions and version-check (w/ github)

Post by kasimi » Fri Feb 09, 2018 10:37 pm

The version_check json contents are not the problem. The script I posted can't even establish a connection, to neither of our json files. I guess it must be an issue on my server.

User avatar
3Di
Registered User
Posts: 12550
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di » Fri Feb 09, 2018 10:40 pm

Test it with cUrl then, as per the above post of mine.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
3Di
Registered User
Posts: 12550
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Extensions and version-check (w/ github)

Post by 3Di » Sat Feb 10, 2018 1:03 am

kasimi wrote:
Fri Feb 09, 2018 9:45 pm
@3Di, I can't fetch your version check file. The output of this script is Error: '' (0)
I tested the CUrl script I above posted, everything works just fine both the script and github.io

That could be an issue by your side then, see:
https://stackoverflow.com/questions/210 ... ver-error0
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests