diff options
author | Yorhel <git@yorhel.nl> | 2019-11-12 20:15:32 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-11-12 20:19:55 +0100 |
commit | 06bacb61526f3945520dd344821d2aa7b85a5f43 (patch) | |
tree | 81e7469ab7ac1c1e3e2a80f79cf49022083f89b6 /lib/VNWeb/DB.pm | |
parent | e525c5fb92612e5459ab04b1c010fb88a3dfa22a (diff) |
v2rw: Move entryLinks() into separate VNDB::ExtLinks module
This is yak shaving. The new module doesn't have much value as it is,
apart from having a central place to define link formats. This new
enrich_extlinks() approach is also a bit more efficient in that it can
avoid separate SQL queries for multiple objects.
But the real reason for these changes is that I can use that %LINKS hash
table to automatically generate the links part in the edit summary and
it should (hopefully) also be useful to generate a more
convenient/streamlined Elm edit form.
Diffstat (limited to 'lib/VNWeb/DB.pm')
-rw-r--r-- | lib/VNWeb/DB.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/DB.pm b/lib/VNWeb/DB.pm index 1583e731..e4905bf0 100644 --- a/lib/VNWeb/DB.pm +++ b/lib/VNWeb/DB.pm @@ -25,7 +25,7 @@ our @EXPORT = qw/ # (and who'd put effort into escaping strings when placeholders are easier?). sub interp_warn { my @r = sql_interp @_; - carp "Possible SQL injection in '$r[0]'" if tuwf->debug && $r[0] =~ /[2-9]/; # 0 and 1 aren't interesting, "SELECT 1" is a common pattern and so is "x > 0" + carp "Possible SQL injection in '$r[0]'" if tuwf->debug && $r[0] =~ /[2-9](?<!r18)/; # 0 and 1 aren't interesting, "SELECT 1" is a common pattern and so is "x > 0" return @r; } |