Extensions and version-check (w/ github)

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

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

Post by kasimi »

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: 1645
Joined: Thu Apr 23, 2009 1:20 pm
Location: Stuttgart, Germany
Name: Christian
Contact:

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

Post by Crizzo »

I don't know. But here is the blog post: https://github.com/blog/2498-weak-crypt ... val-notice
My extensions for phpBB: CDB
German phpBB Support at www.phpbb.de
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

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"
}
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

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

Post by kasimi »

@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
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

@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
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

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.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
kasimi
Former Team Member
Posts: 4900
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

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

Post by kasimi »

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
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

Test it with cUrl then, as per the above post of mine.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

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

Post by 3Di »

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
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Post Reply

Return to “Extension Writers Discussion”