Commit 6b096817 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Crash in create_list_request when list name is missing #490

parent 3fb4ac1e
...@@ -93,8 +93,10 @@ sub check_new_listname { ...@@ -93,8 +93,10 @@ sub check_new_listname {
my $listname = shift; my $listname = shift;
my $robot_id = shift; my $robot_id = shift;
die 'bug in logic. Ask developer' unless (defined $listname and length $listname) {
unless defined $listname and length $listname; $log->syslog('err', 'No listname');
return ('user', 'listname_needed');
}
$listname = lc $listname; $listname = lc $listname;
......
...@@ -60,7 +60,7 @@ sub _twist { ...@@ -60,7 +60,7 @@ sub _twist {
my $robot_id = $request->{context}; my $robot_id = $request->{context};
my $current_list = $request->{current_list}; my $current_list = $request->{current_list};
my $listname = lc $request->{listname}; my $listname = lc($request->{listname} || '');
my $mode = $request->{mode}; my $mode = $request->{mode};
my $pending = $request->{pending}; my $pending = $request->{pending};
my $notify = $request->{notify}; my $notify = $request->{notify};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment