From c71455fb0a525d304126bc7601ed3b3e513ab745 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Thu, 13 Apr 2023 23:10:51 +0200 Subject: [PATCH] Broaden assertion abundance of caution etc --- plugins/statiegeld_tokens | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/statiegeld_tokens b/plugins/statiegeld_tokens index cd5a0d5..44b20b9 100644 --- a/plugins/statiegeld_tokens +++ b/plugins/statiegeld_tokens @@ -171,9 +171,9 @@ sub hook_checkout_prepare($class, $cart, $username, $transaction_id, @) { or next; for my $addon (@{ $sg->{statiegeld_addons} }) { - # These should never contain commas in vanilla revbank, but custom - # plugins may be less well behaved. - /,/ and die "Internal error" + # These should never contain spaces or commas in vanilla revbank, + # but custom plugins may be less well behaved. + /[\s,]/ and die "Internal error" for $addon->{id}, $entry->attribute('product_id'), $transaction_id; for (1 .. $entry->quantity) {