Perl module with web page #815

Closed
opened 2026-10-05 04:46:19 +02:00 by adam · 3 comments
Owner

I have a perl module with a web page for configuration, and I've found the web page no longer works in ZNC 1.6.5 and newer. I'm having trouble finding what has changed in ZNC to cause this.

All I get when I follow the web link is "The requested module does not acknowledge web requests".

The module is https://github.com/wakco/ServiceLogin

ServiceLogin works as expected in ZNC 1.6.2

I have a perl module with a web page for configuration, and I've found the web page no longer works in ZNC 1.6.5 and newer. I'm having trouble finding what has changed in ZNC to cause this. All I get when I follow the web link is "The requested module does not acknowledge web requests". The module is [https://github.com/wakco/ServiceLogin](https://github.com/wakco/ServiceLogin) ServiceLogin works as expected in ZNC 1.6.2 <!-- github-sync-id:295736865 -->
adam closed this issue 2026-10-05 04:46:20 +02:00
Author
Owner

I do not know any perl, but the module's OnWebRequest() method returns 1 while the C++ code expects true here. The error message means that this ended up as false on the C++ side... Some change in SWIG?

I do not know any perl, but the module's `OnWebRequest()` method returns 1 while the C++ code expects true here. The error message means that this ended up as `false` on the C++ side... Some change in SWIG? <!-- github-comment-id:364364264 -->
Author
Owner

(note: private https certificate will require acceptance).

Why you don't use let's encrypt?

Re error: it's easy enough to debug with znc -D:
[2018-02-09 08:38:08.681073] Perl hook died with: TypeError in method 'CTemplate_set', argument 3 of type 'CString const &' at /home/somebody/.znc/modules/ServiceLogin.pm line 95.\x0A
Looking at code... my $preferredModes = 1 - number, not string.

It does work when you already have some settings (because GetNV returns a string), or if you stringify the parameters correctly using "". Did it ever work before with clean settings?

Also, when trying to submit:

Deep recursion on subroutine "ZNC::Core::CallModFunc" at /tmp/znc/lib64/znc/modperl/startup.pl line 611.
Deep recursion on anonymous subroutine at /tmp/znc/lib64/znc/modperl/startup.pl line 225.
[1]    18599 segmentation fault  src/znc -D

Note that your module doesn't support several instances of it being loaded (e.g. for several users), because variables like $servicePassword are global, so shared between all instances. Use $self->{servicePassword} instead.

@psychon Perl doesn't have a dedicated boolean type, so anything "true enough" will suffice. 1 is the usual value for true.

> (note: private https certificate will require acceptance). Why you don't use let's encrypt? Re error: it's easy enough to debug with `znc -D`: `[2018-02-09 08:38:08.681073] Perl hook died with: TypeError in method 'CTemplate_set', argument 3 of type 'CString const &' at /home/somebody/.znc/modules/ServiceLogin.pm line 95.\x0A` Looking at code... `my $preferredModes = 1` - number, not string. It does work when you already have some settings (because `GetNV` returns a string), or if you stringify the parameters correctly using `""`. Did it ever work before with *clean* settings? Also, when trying to submit: ``` Deep recursion on subroutine "ZNC::Core::CallModFunc" at /tmp/znc/lib64/znc/modperl/startup.pl line 611. Deep recursion on anonymous subroutine at /tmp/znc/lib64/znc/modperl/startup.pl line 225. [1] 18599 segmentation fault src/znc -D ``` Note that your module doesn't support several instances of it being loaded (e.g. for several users), because variables like `$servicePassword` are global, so shared between all instances. Use `$self->{servicePassword}` instead. @psychon Perl doesn't have a dedicated boolean type, so anything "true enough" will suffice. 1 is the usual value for true. <!-- github-comment-id:364372396 -->
Author
Owner

Thanks, looking into those now, as for let's encrypt, been using it for four months now, forgot that note was still there.

Thanks, looking into those now, as for let's encrypt, been using it for four months now, forgot that note was still there. <!-- github-comment-id:364388957 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#815