Questions tagged [cgi-application]

CGI::Application is a lightweight, flexible MVC framework used for writing Perl web applications that can be deployed using CGI, FasgCGI, mod_perl, or PSGI.

22 questions
5
votes
1 answer

Suggestions for an authentication system for a Perl CGI::Application

I am building a Perl app with CGI::Application to display software tools, and would like to allow users to add ratings and comments on the tools. Ideally users would need to be registered to post. I'm sure this is a fairly common request and that…
i alarmed alien
  • 9,412
  • 3
  • 27
  • 40
5
votes
2 answers

How to Prevent Cross-Site Request Forgery Attack?

We ran Burp Suite on our product and found some security vulnerabilities. The tool detected some of the CGI files which are vulnerable to Cross-Site Request Forgery attacks (CSRF). As usual I did search for CSRF protection module on CPAN and found…
Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
5
votes
3 answers

How can I provide a temp file download using mod_perl and CGI::Application?

My web app runs on Apache mod_perl using CGI::Application. I want to provide a download of a generated file. In the past (before we were using mod_perl and CGI::App) I just spooled out a csv file to STDOUT as it was generated. Now I'm shooting…
wes
  • 7,795
  • 6
  • 31
  • 41
5
votes
6 answers

How can I run a CGI::Application run mode from the command line?

I have a run mode in my CGI::Application web-app that I would like to be able to trigger from the command line so i can automate it. From the web-app's perspective it does some processing then sends the results in an email. When called from the web…
Todd Hunter
  • 871
  • 1
  • 8
  • 21
4
votes
1 answer

Perl CGI::Fast closes connections without sending data

I am trying to deploy up a Perl application that uses CGI::Application through Nginx, using FastCGI to communicate between them. Nginx keeps returning "502 Bad Gateway", and the error log is filled with this: 2015/02/03 12:40:03 [error] 11209#0: *2…
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
4
votes
2 answers

nginx fastcgi configuration for CGI::Application app

I am trying to get a C::A app work in nginx fastcgi environment (debian 6.0) and using spawn-fcgi. C::A route is configured using $self->mode_param( path_info=> 1, param => 'rm' ); the problem is that whatever C::A app urls (example.com/cities,…
perlwle
  • 353
  • 2
  • 5
  • 17
3
votes
2 answers

Google authentication using perl cgi-application

I have built a CGI::Application currently running on local host and have used 2 authentication methods - 1. descried in http://www.perlmonks.org/?node_id=622071 by storing user password in database and 2. using LDAP credentials. I was looking for a…
prat
  • 607
  • 2
  • 8
  • 22
2
votes
2 answers

How do you get the content type of an uploaded file using CGI::Application?

I am trying to process an uploaded file in a Perl program, using CGI::Application. I need to get the content type of the uploaded file. From what I read, the following should work, but it doesn't for me: my $filename = $q->param("file"); my…
pkaeding
  • 36,513
  • 30
  • 103
  • 141
2
votes
1 answer

How do I hand off a Catalyst request to CGI::Application?

I have a CGI::Application loop like while (my $q = new CGI::Fast){ S::W::Dispatch->dispatch(args_to_new => { QUERY => $q }); my $webapp = S::W::instance(); undef…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
2
votes
4 answers

Are there any medium-sized web applications built with CGI::Application that are open-sourced?

I learn best by taking apart something that already does something and figuring out why decisions were made in which manner. Recently I've started working with Perl's CGI::Application framework, but found i don't really get along well with the…
Mithaldu
  • 2,393
  • 19
  • 39
2
votes
1 answer

CGI::Application param() not setting

I have a piece of code that uses CGI::Application as its base, but something is not working correctly. When I try to set something via $Template->param() it seemingly does not set. $Template is equal to $self->load_tmpl($template); And the piece I…
Sismetic
  • 227
  • 4
  • 16
2
votes
1 answer

CGI::Application::Plugin::REST Instance Script

I am attempting to build a Restful service with CGI::Application::Plugin::REST, but I am not sure how to actually structure the script. Is it the same as using CGI::Application so the below will be the Instance Script referencing modules withing the…
MattSizzle
  • 3,145
  • 1
  • 22
  • 42
1
vote
1 answer

How to allow only one user at a time in this CGI::Application?

I have used this tutorial to make a website, but I would like that only one user is allowed to be logged in at any time. I suppose this change should be made in Login.pm which I have included, but I can't figure out where to put in this…
Sandra Schlichting
  • 25,050
  • 33
  • 110
  • 162
1
vote
2 answers

Passing hash from perl CGI::Application::Plugin::JSON to jquery form plugin

I need to pass a hash from server side to client side. I am using jquery and perl CGI::Application respectively on the front-end and back-end. I am a starter when it comes to using jquery thus I modified the jquery form plug-in example which shows…
saad khan
  • 33
  • 1
  • 5
1
vote
2 answers

How to remove login form from this CGI::Application example?

In this tutorial he creates a custom login form, just to show how it is done. Please search for How do I remove the custom login and fall back to the default? To code looks like this sub cgiapp_init { my $self = shift; my %CFG =…
Sandra Schlichting
  • 25,050
  • 33
  • 110
  • 162
1
2