diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f087b42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1534ba5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +*.log +*spec-20* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fe21a43 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: perl-Mojolicious-Plugin-CSRFDefender +# $Id: Makefile,v 1.1 2021/05/28 19:40:54 michel Exp $ +NAME := perl-Mojolicious-Plugin-CSRFDefender +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/Mojolicious-Plugin-CSRFDefender-0.0.8.tar.gz b/Mojolicious-Plugin-CSRFDefender-0.0.8.tar.gz new file mode 100644 index 0000000..612e0c7 --- /dev/null +++ b/Mojolicious-Plugin-CSRFDefender-0.0.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c4706d2c107bbd994cd8b5d6c67ed909d3ed3f33ebb4980f12e6eb296900572 +size 22591 diff --git a/README.md b/README.md index 7dccd62..c230c22 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # perl-Mojolicious-Plugin-CSRFDefender -3rd Party (Maintained by Koozali) git repo for perl-Mojolicious-Plugin-CSRFDefender smeserver \ No newline at end of file +3rd Party (Maintained by Koozali) git repo for perl-Mojolicious-Plugin-CSRFDefender smeserver + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
+ +Perl-Mojolicious-Plugin-CSRFDefender is a Perl plugin that provides CSRF (Cross-Site Request Forgery) protection for Mojolicious web applications. It adds a random, unique token to every form and then verifies the token's authenticity when the form is submitted. This helps protect against malicious users submitting unwanted requests on behalf of the user. diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/perl-Mojolicious-Plugin-CSRFDefender.spec b/perl-Mojolicious-Plugin-CSRFDefender.spec new file mode 100644 index 0000000..3daeedd --- /dev/null +++ b/perl-Mojolicious-Plugin-CSRFDefender.spec @@ -0,0 +1,68 @@ +Name: perl-Mojolicious-Plugin-CSRFDefender +Version: 0.0.8 +Release: 1%{?dist} +Summary: Defend CSRF automatically in Mojolicious Application +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/Mojolicious-Plugin-CSRFDefender/ +Source0: Mojolicious-Plugin-CSRFDefender-%{version}.tar.gz +#Source0: http://www.cpan.org/authors/id/S/SH/SHIBAZAKI/Mojolicious-Plugin-CSRFDefender-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: perl(Class::Accessor::Fast) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::ParseXS) +BuildRequires: perl(ExtUtils::Manifest) +BuildRequires: perl(Mojolicious) >= 1.43 +BuildRequires: perl(Mojolicious::Lite) +BuildRequires: perl(Path::Class) +BuildRequires: perl(String::Random) +BuildRequires: perl(Test::Class) +BuildRequires: perl(Test::Mojo) +BuildRequires: perl(Test::More) +Requires: perl(Class::Accessor::Fast) +Requires: perl(Mojolicious) >= 1.43 +Requires: perl(Path::Class) +Requires: perl(String::Random) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +This plugin defends CSRF automatically in Mojolicious Application. +Following is the strategy. + +%prep +%setup -q -n Mojolicious-Plugin-CSRFDefender-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT + +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT + +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; + +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc Changes README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Fri Jul 14 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Sun Mar 07 2021 Michel Begue 0.0.8-1 +- Specfile autogenerated by cpanspec 1.78.