Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

You should avoid hedging, at least that's what I think.


dovenet / Synchronet Javascript / HTTPRequest() calling to api.telegram.org

SubjectAuthor
* HTTPRequest() calling to api.telegram.orgKarloch
`- HTTPRequest() calling to api.telegram.orgnelgin

1
HTTPRequest() calling to api.telegram.org

<65931F25.3925.dove-syncjs@bbs.hispamsx.org>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=123&group=DOVE-Net.Synchronet_Javascript#123

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: karloch@VERT/HISPAMSX (Karloch)
To: All
Subject: HTTPRequest() calling to api.telegram.org
Message-ID: <65931F25.3925.dove-syncjs@bbs.hispamsx.org>
Date: Mon, 1 Jan 2024 21:23:01 +0100
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: HispaMSX BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.20a-Linux master/c080dce25 Dec 28 2023 GCC 12.2.0
X-FTN-CHRS: CP437 2
WhenImported: 20240101174733-0800 41e0
WhenExported: 20240101201331-0800 41e0
ExportedFrom: VERT sync-js 3968
WhenImported: 20240101212301+0100 103c
WhenExported: 20240102024731+0100 103c
ExportedFrom: HISPAMSX dove-syncjs 3925
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Karloch - Mon, 1 Jan 2024 20:23 UTC

Hi everyone!

I have forked echiken's chat_pager external module [1] and added two new notification methods: Telegram Bot and remote PC Speaker via Raspberry Pi. I have published the fork at [2] and it is working well so far.

However, if you take a look at the repo, you will see I had to implement a workarround for HTTPRequest() method from http.js, so it can work properly with api.telegram.org.

The issue is that this code:

var response = new HTTPRequest().Get(
"https://api.telegram.org/bot-mytoken/SendMessage"
);

will throw the following error:

term TLS WARNING 'Server provided a broken/invalid certificate, try again with a reduced level of certificate compliance checking' (-32) setting attribute 6001

To me it looks like the cryptlib is, for some reason, not trusting the certificate chain used by api.telegram.org. I have tested HTTPRequest() with other HTTPS sites and it works as expected.

I made the module work by proxying the calls to the API endpoint via NGINX, but I don't consider that a clean solution. Workarround details at [2].

Could someone test if the the same is happening? Maybe that Synchronet BBS is using some kind of very strict certificate validation parameters in cryptlib that does not comply with the one used by Telegram API? If the answer to this is yes, is it something it could be modified or configured?

Thanks!
Carlos

[1] https://gitlab.synchro.net/main/sbbs/-/tree/master/xtrn/chat_pager
[2] https://github.com/cmilanf/sbbs-xtrn-sysop_pager

PD: If you happen to read this text, thanks echiken for the module. It has served me as inspiration to bring back something I really missed after I moved my Synchronet BBS from a physical host to a virtual machine: the capability to play tones via PC Speaker in the same way as playtone used to.

---
■ Synchronet ■ HISPAMSX BBS - The 8-bit MSX computers BBS - 2:341/111@fidonet

HTTPRequest() calling to api.telegram.org

<65B7446E.1464.dove-syncjs@endofthelinebbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=874&group=DOVE-Net.Synchronet_Javascript#874

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: nelgin@VERT/EOTLBBS (nelgin)
To: Karloch
Subject: HTTPRequest() calling to api.telegram.org
Message-ID: <65B7446E.1464.dove-syncjs@endofthelinebbs.com>
Date: Mon, 29 Jan 2024 00:23:42 -0600
X-Comment-To: Karloch
Path: rocksolidbbs.com!not-for-mail
Organization: End Of The Line BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <65931F25.3925.dove-syncjs@bbs.hispamsx.org>
References: <65931F25.3925.dove-syncjs@bbs.hispamsx.org>
X-FTN-PID: Synchronet 3.20a-Linux master/704eba931 Jan 27 2024 GCC 11.4.0
X-FTN-CHRS: CP437 2
WhenImported: 20240128223511-0800 41e0
WhenExported: 20240129034810-0800 41e0
ExportedFrom: VERT sync-js 3973
WhenImported: 20240129002342-0600 4168
WhenExported: 20240129003510-0600 4168
ExportedFrom: EOTLBBS dove-syncjs 1464
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: nelgin - Mon, 29 Jan 2024 06:23 UTC

Re: HTTPRequest() calling to api.telegram.org
By: Karloch to All on Mon Jan 01 2024 21:23:01

> I have forked echiken's chat_pager external module [1] and added two new
> notification methods: Telegram Bot and remote PC Speaker via Raspberry Pi. I
> have published the fork at [2] and it is working well so far.

cryptlib has recently been updated so you could try it on the latest synchronet build.

---
■ Synchronet ■ End Of The Line BBS - endofthelinebbs.com


dovenet / Synchronet Javascript / HTTPRequest() calling to api.telegram.org

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor