# # spec file for package perl-CGI-Untaint # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name CGI-Untaint Name: perl-CGI-Untaint Version: 1.260.0 Release: 0 # 1.26 -> normalize -> 1.260.0 %define cpan_version 1.26 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Process CGI input parameters URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/T/TM/TMTM/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(UNIVERSAL::require) >= 0.01 Requires: perl(UNIVERSAL::require) >= 0.01 Provides: perl(CGI::Untaint) = %{version} Provides: perl(CGI::Untaint::hex) Provides: perl(CGI::Untaint::integer) Provides: perl(CGI::Untaint::object) Provides: perl(CGI::Untaint::printable) %undefine __perllib_provides %{perl_requires} # MANUAL BEGIN BuildRequires: perl(CGI) Requires: perl(CGI) # MANUAL END %description Dealing with large web based applications with multiple forms is a minefield. It's often hard enough to ensure you validate all your input at all, without having to worry about doing it in a consistent manner. If any of the validation rules change, you often have to alter them in many different places. And, if you want to operate taint-safe, then you're just adding even more headaches. This module provides a simple, convenient, abstracted and extensible manner for validating and untainting the input from web forms. You simply create a handler with a hash of your parameters (usually $q->Vars), and then iterate over the fields you wish to extract, performing whatever validations you choose. The resulting variable is guaranteed not only to be valid, but also untainted. %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README %changelog