
richter at locus
Apr 13, 2000, 2:37 PM
Post #1 of 1
(383 views)
Permalink
|
|
cvs commit: embperl/test/cmp escape.htm
|
|
richter 00/04/13 14:37:03 Modified: . Changes.pod Embperl.pm Embperl.pod EmbperlD.pod EmbperlObject.pm TODO embpcgi.bat embpcgi.pl embpcgi.test.bat embpcgi.test.pl embpexec.bat embpexec.pl epchar.c Embperl Mail.pm Module.pm emacs embperl.el test/cmp escape.htm Log: - Escape ", ', < and > in URLs. Spotted by Roman Maeder. - Added EMBPERL_SESSION_HANDLER_CLASS which allows you to overwrite Embperl defaults session handling. Idea form Barrie Slaymaker. Revision Changes Path 1.108 +4 -0 embperl/Changes.pod Index: Changes.pod =================================================================== RCS file: /home/cvs/embperl/Changes.pod,v retrieving revision 1.107 retrieving revision 1.108 diff -u -r1.107 -r1.108 --- Changes.pod 2000/03/29 07:00:38 1.107 +++ Changes.pod 2000/04/13 21:36:51 1.108 @@ -27,6 +27,10 @@ packagename and the packagename differs from request to request, the page is compiled for every package and therfore consuming memory on every request. + - Escape ", ', < and > in URLs. Spotted by Roman Maeder. + - Added EMBPERL_SESSION_HANDLER_CLASS which allows you to overwrite + Embperl defaults session handling. Idea form Barrie Slaymaker. + =head1 1.3b2 (BETA) 11. Feb 2000 1.95 +5 -3 embperl/Embperl.pm Index: Embperl.pm =================================================================== RCS file: /home/cvs/embperl/Embperl.pm,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- Embperl.pm 2000/03/29 19:41:40 1.94 +++ Embperl.pm 2000/04/13 21:36:52 1.95 @@ -10,7 +10,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# $Id: Embperl.pm,v 1.94 2000/03/29 19:41:40 richter Exp $ +# $Id: Embperl.pm,v 1.95 2000/04/13 21:36:52 richter Exp $ # ################################################################################### @@ -376,10 +376,12 @@ lock_manager => $lm ) ; - require HTML::Embperl::Session ; + my $session_handler = $ENV{EMBPERL_SESSION_HANDLER_CLASS} || 'HTML::Embperl::Session' ; + eval "require $session_handler" ; + die $@ if ($@) ; - tie %udat, 'HTML::Embperl::Session', undef, \%sargs ; - tie %mdat, 'HTML::Embperl::Session', undef, \%sargs ; + tie %udat, $session_handler, undef, \%sargs ; + tie %mdat, $session_handler, undef, \%sargs ; $SessionMgnt = 2 ; warn "[$$]SES: Embperl Session management enabled (1.xx)\n" if ($ENV{MOD_PERL}) ; } 1.45 +6 -0 embperl/Embperl.pod Index: Embperl.pod =================================================================== RCS file: /home/cvs/embperl/Embperl.pod,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- Embperl.pod 2000/03/29 19:41:40 1.44 +++ Embperl.pod 2000/04/13 21:36:52 1.45 @@ -1003,6 +1003,12 @@ PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=www Password=secret" +=head2 EMBPERL_SESSION_HANDLER_CLASS (1.3b3 and higher) + +Set the class that performs the Embperl session handling. Default is +C<HTML::Embperl::Session>. You can overwrite I<HTML::Embperl::Session> and +specify the name of your class within this variable. This gives you +the possibility to implement your own session handling. =head1 SYNTAX 1.18 +6 -0 embperl/EmbperlD.pod Index: EmbperlD.pod =================================================================== RCS file: /home/cvs/embperl/EmbperlD.pod,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- EmbperlD.pod 2000/03/19 13:39:02 1.17 +++ EmbperlD.pod 2000/04/13 21:36:52 1.18 @@ -912,6 +912,12 @@ PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=www Password=secret" +=head2 EMBPERL_SESSION_HANDLER_CLASS (ab 1.3b3) + +Bestimmt die Klasse die das Session Handling für I<Embperl durchführt>. +Default ist C<HTML::Embperl::Session>. Sie können eine eigene Klasse von +I<HTML::Embperl::Session> ableiten und diese hier angeben um Ihr eigenes +Session Handling zu implementieren. =head2 EMBPERL_COOKIE_NAME (ab 1.2b4) 1.19 +0 -0 embperl/EmbperlObject.pm Index: EmbperlObject.pm =================================================================== RCS file: /home/cvs/embperl/EmbperlObject.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- EmbperlObject.pm 2000/03/29 19:41:40 1.18 +++ EmbperlObject.pm 2000/04/13 21:36:53 1.19 @@ -10,7 +10,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# $Id: EmbperlObject.pm,v 1.18 2000/03/29 19:41:40 richter Exp $ +# $Id: EmbperlObject.pm,v 1.19 2000/04/13 21:36:53 richter Exp $ # ################################################################################### 1.90 +3 -6 embperl/TODO Index: TODO =================================================================== RCS file: /home/cvs/embperl/TODO,v retrieving revision 1.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- TODO 2000/03/29 04:47:06 1.89 +++ TODO 2000/04/13 21:36:53 1.90 @@ -55,15 +55,12 @@ - return custom error code to Apache [Alan Gutierrez 11.2.00] -- AIX Patch [Jens Uwe Mager 10.3.00] - -- package cache patch [Francis J. Lacoste 17.03.00] - -- param restore after Execute patch [Francis J. Lacoste 17.03.00/27.03.00] - - send last modified header if no perl in the doc [Christain Gilmore 23.02.00] - turn off all perl processin [Kee Hinckley 22.03.00] + +- accpect \0 as separator for multiple with same name in %fdat (as CGI->Vars) + [Ilia Lobsanov 8.4.00] Test ---- 1.7 +2 -2 embperl/embpcgi.bat Index: embpcgi.bat =================================================================== RCS file: /home/cvs/embperl/embpcgi.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- embpcgi.bat 2000/03/28 19:14:08 1.6 +++ embpcgi.bat 2000/04/13 21:36:53 1.7 @@ -1,9 +1,9 @@ @rem = '--*-Perl-*-- @echo off -/usr/bin/perldbg -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 +/usr/bin/perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl @rem '; -#!/usr/bin/perldbg -- +#!/usr/bin/perl -- #line 8 ################################################################################### # 1.7 +1 -1 embperl/embpcgi.pl Index: embpcgi.pl =================================================================== RCS file: /home/cvs/embperl/embpcgi.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- embpcgi.pl 2000/03/28 19:14:08 1.6 +++ embpcgi.pl 2000/04/13 21:36:53 1.7 @@ -1,4 +1,4 @@ -#!/usr/bin/perldbg +#!/usr/bin/perl ################################################################################### # # Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS 1.5 +2 -2 embperl/embpcgi.test.bat Index: embpcgi.test.bat =================================================================== RCS file: /home/cvs/embperl/embpcgi.test.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- embpcgi.test.bat 2000/03/28 19:14:08 1.4 +++ embpcgi.test.bat 2000/04/13 21:36:53 1.5 @@ -1,9 +1,9 @@ @rem = '--*-Perl-*-- @echo off -/usr/bin/perldbg -x -T %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 +/usr/bin/perl -x -T %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl @rem '; -#!/usr/bin/perldbg -- +#!/usr/bin/perl -- #line 8 ################################################################################### # 1.7 +1 -1 embperl/embpcgi.test.pl Index: embpcgi.test.pl =================================================================== RCS file: /home/cvs/embperl/embpcgi.test.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- embpcgi.test.pl 2000/03/28 19:14:08 1.6 +++ embpcgi.test.pl 2000/04/13 21:36:53 1.7 @@ -1,4 +1,4 @@ -#!/usr/bin/perldbg +#!/usr/bin/perl ################################################################################### # # Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS 1.18 +2 -2 embperl/embpexec.bat Index: embpexec.bat =================================================================== RCS file: /home/cvs/embperl/embpexec.bat,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- embpexec.bat 2000/03/28 19:14:08 1.17 +++ embpexec.bat 2000/04/13 21:36:54 1.18 @@ -1,9 +1,9 @@ @rem = '--*-Perl-*-- @echo off -/usr/bin/perldbg -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 +/usr/bin/perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl @rem '; -#!/usr/bin/perldbg -- +#!/usr/bin/perl -- #line 8 ################################################################################### # 1.18 +1 -1 embperl/embpexec.pl Index: embpexec.pl =================================================================== RCS file: /home/cvs/embperl/embpexec.pl,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- embpexec.pl 2000/03/28 19:14:08 1.17 +++ embpexec.pl 2000/04/13 21:36:54 1.18 @@ -1,4 +1,4 @@ -#!/usr/bin/perldbg +#!/usr/bin/perl ################################################################################### # # Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS 1.10 +3 -3 embperl/epchar.c Index: epchar.c =================================================================== RCS file: /home/cvs/embperl/epchar.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- epchar.c 1999/11/02 08:32:47 1.9 +++ epchar.c 2000/04/13 21:36:54 1.10 @@ -331,7 +331,7 @@ { '$' , "" }, /* $ Dollar sign */ { '%' , "%25" }, /* % Percent sign */ { '&' , "%26" }, /* Ampersand */ - { '\'' , "" }, /* ' Apostrophe */ + { '\'' , "%27" }, /* ' Apostrophe */ { '(' , "" }, /* ( Left parenthesis */ { ')' , "" }, /* ) Right parenthesis */ { '*' , "" }, /* * Asterisk */ @@ -352,9 +352,9 @@ { '9' , "" }, /* 9 Digit 9 */ { ':' , "" }, /* : Colon */ { ';' , "" }, /* ; Semicolon */ - { '<' , "" }, /* Less than */ + { '<' , "%3C" }, /* Less than */ { '=' , "%3D" }, /* = Equals sign */ - { '>' , "" }, /* Greater than */ + { '>' , "%3E" }, /* Greater than */ { '?' , "%3F" }, /* ? Question mark */ { '@' , "" }, /* @ Commercial at */ { 'A' , "" }, /* A Capital A */ 1.18 +0 -0 embperl/Embperl/Mail.pm Index: Mail.pm =================================================================== RCS file: /home/cvs/embperl/Embperl/Mail.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Mail.pm 2000/03/29 19:41:41 1.17 +++ Mail.pm 2000/04/13 21:36:59 1.18 @@ -9,7 +9,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# $Id: Mail.pm,v 1.17 2000/03/29 19:41:41 richter Exp $ +# $Id: Mail.pm,v 1.18 2000/04/13 21:36:59 richter Exp $ # ################################################################################### 1.19 +0 -0 embperl/Embperl/Module.pm Index: Module.pm =================================================================== RCS file: /home/cvs/embperl/Embperl/Module.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Module.pm 2000/03/29 19:41:41 1.18 +++ Module.pm 2000/04/13 21:37:00 1.19 @@ -9,7 +9,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# $Id: Module.pm,v 1.18 2000/03/29 19:41:41 richter Exp $ +# $Id: Module.pm,v 1.19 2000/04/13 21:37:00 richter Exp $ # ################################################################################### @@ -25,7 +25,7 @@ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# $Id: Module.pm,v 1.18 2000/03/29 19:41:41 richter Exp $ +# $Id: Module.pm,v 1.19 2000/04/13 21:37:00 richter Exp $ # ################################################################################### 1.87 +0 -0 embperl/emacs/embperl.el Index: embperl.el =================================================================== RCS file: /home/cvs/embperl/emacs/embperl.el,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- embperl.el 2000/03/29 19:41:42 1.86 +++ embperl.el 2000/04/13 21:37:01 1.87 @@ -19,9 +19,9 @@ ;; Author : Erik Arneson (erik [at] mind) ;; Created On : Wed Jul 22 17:16:39 PDT 1998 ;; Last Modified By: Erik Arneson -;; Last Modified On: $Date: 2000/03/29 19:41:42 $ +;; Last Modified On: $Date: 2000/04/13 21:37:01 $ ;; Version : 1.00 -;; $Id: embperl.el,v 1.86 2000/03/29 19:41:42 richter Exp $ +;; $Id: embperl.el,v 1.87 2000/04/13 21:37:01 richter Exp $ ;; ;; Please note that this software is very beta and rather broken. I ;; don't know how useful it will be, although I definitely plan on 1.13 +5 -5 embperl/test/cmp/escape.htm Index: escape.htm =================================================================== RCS file: /home/cvs/embperl/test/cmp/escape.htm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- escape.htm 1999/10/07 07:07:02 1.12 +++ escape.htm 2000/04/13 21:37:02 1.13 @@ -30,8 +30,8 @@ A Tag 10: <A TARGET="10" HREF="10" TARGET="10">x</A> A Tag 11: <A HREF="11" >x</A> A Tag 12: <A HREF=12>x</A> -A Tag 13: <A HREF="abcd%20>">x</A> -A Tag 14: <A HREF="abcd%20>">x</A> +A Tag 13: <A HREF="abcd%20%3E">x</A> +A Tag 14: <A HREF="abcd%20%3E">x</A> FRAME: <FRAME SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo"> IFRAME: <IFRAME SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo"> EMBED: <EMBED SRC="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521" name="%20foo"> @@ -52,7 +52,7 @@ 2 Now lets look what we are getting from this:<BR> -(this+is+the+value+in+$a) (this+is+the+value+in+$a)+äöüäöü%3F%3F%3F<%26%2B++<BR> +(this+is+the+value+in+$a) (this+is+the+value+in+$a)+äöüäöü%3F%3F%3F%3C%26%2B++<BR> What is the EscMode? 2 Now a Url: <A HREF="http://localhost/tests?id=abcdefghijklmnopqrstuvwxyz&text=This+is+a+text+%3F+%26+%2B+-+%2521">Here it goes</A> @@ -76,7 +76,7 @@ Now we localy set $escmode:<BR> (this is the value in $a) äöüäöü???<&+ <BR> (this is the value in $a) äöüäöü???<&+ <BR> -(this+is+the+value+in+$a)+äöüäöü%3F%3F%3F<%26%2B++<BR> +(this+is+the+value+in+$a)+äöüäöü%3F%3F%3F%3C%26%2B++<BR> (this is the value in $a) äöüäöü???<&+ <BR> 0 @@ -195,4 +195,4 @@ </body> </html> - +
|