-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom_input fail with 6.2.48 #846
Comments
Hi @aepli , Could you please show us these things?
Thanks. |
@aepli , Could you please apply this patch and check if the problem will be solved? |
Hi @ikedas, Here are the steps to reproduce the problem:
The error message is then displayed and no list creation request is saved. Here is the template for Confidential list setup:
|
Hi @ikedas, If I understand the error message, the problem is on line 2114. If I comment on lines 2114 to 2116, there is no more error. But this disables log for debug level 2!
I think there must be a problem with $Conf::Conf{$key}{type}, but I'm not sure. Regards. |
@aepli , how about this? index 8d0a09f..a97ba6b 100644
--- a/src/cgi/wwsympa.fcgi.in
+++ b/src/cgi/wwsympa.fcgi.in
@@ -2108,12 +2108,11 @@ sub get_parameters {
unless defined $plugin->{$plugin_name};
$plugin->{$plugin_name}{$param_name} = $in{$p};
undef $in{$p};
- } elsif ($pname =~ /^custom_input(.*)$/) {
+ } elsif ($pname eq 'custom_input') {
my $key = $tokens[1];
$regexp = $in_regexp{'custom_input'};
- $log->syslog('debug2',
- "get_parameters (custom_input) : ($p)($key) $pname $in{$p} $Conf::Conf{$key}{type}"
- );
+ $log->syslog('debug2', '(%s) %s', $p, $in{$p});
+ $custom_input ||= {};
$custom_input->{$key} = $in{$p};
undef $in{$p};
} elsif ($in_regexp{$pname}) {
@@ -2180,7 +2179,7 @@ sub get_parameters {
}
$in{custom_attribute} = $custom_attribute;
- $in{custom_input} = $custom_input;
+ $in{custom_input} = $custom_input if $custom_input;
$in{plugin} = $plugin;
return 1; And, will custom_input parameters be handled properly with this change? |
@ikedas, excellent no more error in Apache and Perl no longer "dies"! The custom_input parameter is correctly processed. Thank you so much. Regards. |
Bug: Crash by assigning to uninitialized hashref (#846)
@aepli , thanks for reporting bug and confirming fix! |
Version
Sympa 6.2.48
Installation method
From source
Expected behavior
custom_input should be usable in the list creation form as in the versions of Sympa up to 6.2.22.
Actual behavior
if using custom_input.visibility in the Request a List form, when using the "submit your creation request" button, the request is not processed and an error message is displayed:
Additional information
OS: Debian GNU/Linux 9.11 (stretch)
Perl: 5.24.1-3+deb9u5 amd64
The log message:
scenario_label.tt2:
create_list_request.tt2:
The text was updated successfully, but these errors were encountered: