Catalys...Untaint(3)

πŸ“¦
version 0.05 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Catalyst::Plugin::CGI::Untaint β€” a lil plugin for Catalyst, bestie πŸŽ€

(it's filed under Catalys...Untaint(3), in case you were squinting at the terminal like "who is she" β€” she's you, after you read this)


✨ SYNOPSIS ✨

okay so first you gotta load her up. in your MainApp.pm:

# In your MainApp.pm:
use Catalyst qw/CGI::Untaint/;

then in your form handler you do the cute little thing:

# Put into your form handler:
my $email = $c->untaint(-as_email => 'email');
# Will extract only a valid email address from $c->req->params->{email}

and if she comes back empty, no stress, you can get the reason she rejected it with -last_error:

# Use -last_error to get the rejection reason:
if (not $email) {
    $error = $c->untaint(-last_error => 'email');
}
🫢 quick heads up bestie β€” for that example up there to actually work, you need CGI::Untaint and CGI::Untaint::email installed. no cap.

🌸 DESCRIPTION 🌸

This module wraps CGI::Untaint up into a Catalyst plugin. that's it, that's the vibe πŸ’…

Wanna know how to actually use CGI::Untaint? go read its own documentation, she explains herself way better than I can. iykyk πŸ“–βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catalyst
  • CGI::Untaint

πŸ‘‘ AUTHOR πŸ‘‘

Toby Corkindale, <cpan@corkindale.net>


Copyright (C) 2006 by Toby Corkindale

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.


and that's the whole page, periodt πŸ’…βœ¨ this was perl v5.42.0, dated 2025-07-25, from the User Contributed Perl Documentation collection β€” go forth and untaint those inputs, you absolute icon πŸŽ€πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from