view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
t/02input.t view on Meta::CPAN
use warnings;
# We need a UTF-8 locale to force libtermkey into UTF-8 handling, even if the
# system locale is not
# We also need to fool libtermkey into believing TERM=xterm even if it isn't,
# so we can reliably control it with fake escape sequences
BEGIN {
$ENV{LANG} .= ".UTF-8" unless $ENV{LANG} =~ m/\.UTF-8$/;
$ENV{TERM} = "xterm";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Twitter/Stream.pm view on Meta::CPAN
my $uri = URI->new(delete $args{api_url} || $methods{$method}[1]());
my $request_body;
my $request_method = delete $args{request_method} || $methods{$method}[0] || 'GET';
if ( $request_method eq 'POST' ) {
$request_body = join '&', map "$_=" . URI::Escape::uri_escape_utf8($args{$_}), keys %args;
}else{
$uri->query_form(%args);
}
my $auth;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/UWSGI.pm view on Meta::CPAN
$env->{REMOTE_PORT} = $lport;
$env->{SERVER_PORT} = $rport;
$env->{SERVER_NAME} = $rhost;
if ($hdr{'x-uwsgi-nginx-compatible-mode'}) {
$env->{PATH_INFO} = Encode::decode('utf8', URI::Escape::XS::uri_unescape($env->{PATH_INFO}));
}
foreach my $k (keys %hdr) {
(my $env_k = uc $k) =~ tr/-/_/;
$env->{"HTTP_$env_k"} = defined $hdr{$k} ? $hdr{$k} : '';
view all matches for this distribution
view release on metacpan or search on metacpan
WebDriver.pm view on Meta::CPAN
%SPECIAL_KEY || do {
for (split /\n/, $SPECIAL_KEY) {
s/"//g or next;
my ($k, $s, $name) = split /\t/;
# unescape \uXXXX, convert string to codepoint
$_ = /^\\u/ ? hex substr $_, 2 : ord
for $k, $s;
$SPECIAL_KEY{$name} = $k;
$SPECIAL_KEY{"Shift-$name"} = $s if $s;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Ext/HTML.pm view on Meta::CPAN
Initialize the extension. This does not need to be called externally.
=head1 CAVEATS
HTML messages are not validated nor escaped, so it is your responsibility to
use valid XHTML-IM tags and to close them properly.
=head1 AUTHOR
Charles McGarvey <ccm@cpan.org>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/XMPP/Component.pm view on Meta::CPAN
}
my $self = $class->SUPER::new (%args);
$self->{parser}->set_stream_cb (sub {
my $secret = $self->{parser}->{parser}->xml_escape ($self->{secret});
my $id = $self->{stream_id} = $_[0]->attr ('id');
$self->{writer}->send_handshake ($id, $secret);
});
$self->reg_cb (recv_stanza_xml => sub {
view all matches for this distribution
view release on metacpan or search on metacpan
newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL
newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL
newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL
newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL
pv_display() NEED_pv_display NEED_pv_display_GLOBAL
pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL
pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL
sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL
sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL
sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL
sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL
put_charclass_bitmap_innards_invlist|||
put_charclass_bitmap_innards|||
put_code_point|||
put_range|||
pv_display|5.006000||p
pv_escape|5.009004||p
pv_pretty|5.009004||p
pv_uni_display||5.007003|
qerror|||
qsortsvu|||
quadmath_format_needed|||n
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
#if defined(NEED_pv_escape)
static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
static
#else
extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
#endif
#ifdef pv_escape
# undef pv_escape
#endif
#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
#define Perl_pv_escape DPPP_(my_pv_escape)
#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
char *
DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
const STRLEN count, const STRLEN max,
STRLEN * const escaped, const U32 flags)
{
const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
char octbuf[32] = "%123456789ABCDF";
STRLEN wrote = 0;
wrote++;
}
if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
break;
}
if (escaped != NULL)
*escaped= pv - str;
return SvPVX(dsv);
}
#endif
#endif
DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
const STRLEN max, char const * const start_color, char const * const end_color,
const U32 flags)
{
const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
STRLEN escaped;
if (!(flags & PERL_PV_PRETTY_NOCLEAR))
sv_setpvs(dsv, "");
if (dq == '"')
sv_catpvs(dsv, "<");
if (start_color != NULL)
sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
if (end_color != NULL)
sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
if (dq == '"')
sv_catpvs(dsv, "\"");
else if (flags & PERL_PV_PRETTY_LTGT)
sv_catpvs(dsv, ">");
if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
sv_catpvs(dsv, "...");
return SvPVX(dsv);
}
view all matches for this distribution
view release on metacpan or search on metacpan
newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL
newSV_type() NEED_newSV_type NEED_newSV_type_GLOBAL
newSVpvn_flags() NEED_newSVpvn_flags NEED_newSVpvn_flags_GLOBAL
newSVpvn_share() NEED_newSVpvn_share NEED_newSVpvn_share_GLOBAL
pv_display() NEED_pv_display NEED_pv_display_GLOBAL
pv_escape() NEED_pv_escape NEED_pv_escape_GLOBAL
pv_pretty() NEED_pv_pretty NEED_pv_pretty_GLOBAL
sv_2pv_flags() NEED_sv_2pv_flags NEED_sv_2pv_flags_GLOBAL
sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL
sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL
sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL
ptr_table_split||5.009005|
ptr_table_store||5.009005|
push_scope|||
put_byte|||
pv_display|5.006000||p
pv_escape|5.009004||p
pv_pretty|5.009004||p
pv_uni_display||5.007003|
qerror|||
qsortsvu|||
re_compile||5.009005|
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
#if defined(NEED_pv_escape)
static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
static
#else
extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
#endif
#ifdef pv_escape
# undef pv_escape
#endif
#define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
#define Perl_pv_escape DPPP_(my_pv_escape)
#if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
char *
DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
const STRLEN count, const STRLEN max,
STRLEN * const escaped, const U32 flags)
{
const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
char octbuf[32] = "%123456789ABCDF";
STRLEN wrote = 0;
wrote++;
}
if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
break;
}
if (escaped != NULL)
*escaped= pv - str;
return SvPVX(dsv);
}
#endif
#endif
DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
const STRLEN max, char const * const start_color, char const * const end_color,
const U32 flags)
{
const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
STRLEN escaped;
if (!(flags & PERL_PV_PRETTY_NOCLEAR))
sv_setpvs(dsv, "");
if (dq == '"')
sv_catpvs(dsv, "<");
if (start_color != NULL)
sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
if (end_color != NULL)
sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
if (dq == '"')
sv_catpvs(dsv, "\"");
else if (flags & PERL_PV_PRETTY_LTGT)
sv_catpvs(dsv, ">");
if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
sv_catpvs(dsv, "...");
return SvPVX(dsv);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AnyEvent/Yubico.pm view on Meta::CPAN
$params->{h} = $self->sign($params);
}
my $query = "";
for my $key (keys %$params) {
$query = "$query&$key=".uri_escape($params->{$key});
}
$query = "?".substr($query, 1);
my $last_response;
my @requests = ();
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
inc/Module/Install/Metadata.pm view on Meta::CPAN
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Aozora2Epub.pm view on Meta::CPAN
use Aozora2Epub::CachedGet qw/http_get/;
use Aozora2Epub::Epub;
use Aozora2Epub::XHTML;
use Path::Tiny;
use URI;
use HTML::Escape qw/escape_html/;
use base qw(Class::Accessor);
__PACKAGE__->mk_accessors(qw/files title author epub bib_info notation_notes/);
our $VERSION = '0.05';
lib/Aozora2Epub.pm view on Meta::CPAN
$self->bib_info(join('',
$self->bib_info,
"<br/>",
($part_title
? (q{<h5 class="bib">}, escape_html($part_title), "</h5>")
: ()),
$bib_info));
}
sub add_notation_notes {
lib/Aozora2Epub.pm view on Meta::CPAN
$self->notation_notes(join('',
$self->notation_notes,
"<br/>",
($part_title
? (q{<h5 class="n-notes">}, escape_html($part_title), "</h5>")
: ()),
$notes));
}
sub _make_content_iterator {
view all matches for this distribution
view release on metacpan or search on metacpan
many powerful extensions, including XML taglibs, XSLT rendering,
and new events not originally part of the ASP API!
=begin html
<table class="noescape" border="0"><tr><td>
<b>Apache::ASP's features include:</b>
<font face=verdana,helvetica,arial size=-1>
<ul>
<li> Scripting SYNTAX is Natural and Powerful
<li> Rich OBJECTS Developer API
with caching output from $Response->Include(\%cache)
running on a Linux 2.2.14 dual PIII-450.
The variables are output size being cached & the CacheDB used,
the default being MLDBM::Sync::SDBM_File.
<table class="noescape" border="0">
<tr><th>CacheDB</th><th>Output Cached</th><th>Operation</th><th>Ops/sec</th></tr>
<tr><td>MLDBM::Sync::SDBM_File</td> <td>3200 bytes</td> <td>read</td> <td>177</td></tr>
<tr><td>DB_File</td> <td>3200 bytes</td> <td>read</td> <td>59</td></tr>
<tr><td>MLDBM::Sync::SDBM_File</td> <td>32000 bytes</td> <td>read</td> <td>42</td></tr>
<tr><td>DB_File</td> <td>32000 bytes</td> <td>read</td> <td>53</td></tr>
my $script = "<\% print 'TEST'; %\>";
$Response->Include(\$script);
%>
This include would output TEST. Note that tokens like
<% and %> must be escaped so Apache::ASP does not try
to compile those code blocks directly when compiling
the original script. If the $script data were fetched
directly from some external resource like a database,
then these tokens would not need to be escaped at all as in:
<%
my $script = $dbh->selectrow_array(
"select script_text from scripts where script_id = ?",
undef, $script_id
Not implemented, will likely not ever be because this is dependent
on how IIS handles errors and is not relevant in Apache.
=item $Server->HTMLEncode( $string || \$string )
Returns an HTML escapes version of $string. &, ", >, <, are each
escapes with their HTML equivalents. Strings encoded in this nature
should be raw text displayed to an end user, as HTML tags become
escaped with this method.
As of version 2.23, $Server->HTMLEncode() may take a string reference
for an optmization when encoding a large buffer as an API extension.
Here is how one might use one over the other:
$Response->Include($file, @args);
$Response->End;
=item $Server->URLEncode($string)
Returns the URL-escaped version of the string $string. +'s are substituted in
for spaces and special characters are escaped to the ascii equivalents.
Strings encoded in this manner are safe to put in urls... they are especially
useful for encoding data used in a query string as in:
$data = $Server->URLEncode("test data");
$url = "http://localhost?data=$data";
(d) Documentation update about flock() work around for
Win95/Win98/WinMe systems, confirmed by Rex Arul
(d) Documentation/site build bug found by Mitsunobu Ozato,
where <% %> not being escaped correctly with $Server->HTMLEncode().
New japanese documentation project started by him
at http://sourceforge.jp/projects/apache-asp-jp/
-InitPackageGlobals() called after new Apache::ASP object created so
core system templates can be compiled even when there was a runtime
view all matches for this distribution
view release on metacpan or search on metacpan
=item BodyArgs
This entire string is passed in the <BODY> tag. Useful for setting
background images, background color, link colors, etc. If set in the
httpd.conf file, you must put quotes around the value, and escape any
quotes in the value. If this value is set in the .htaccess file, this
is not necessary:
In httpd.conf: PerlSetVar BodyArgs "BACKGROUND=gray.gif text=\"#FFFFFF\""
In .htaccess : PerlSetVar BodyArgs BACKGROUND=gray.gif text="#FFFFFF"
view all matches for this distribution
view release on metacpan or search on metacpan
JavaScript.pm view on Meta::CPAN
my $repl = join("'+'", $orig =~ /(.{1,4})/g);
$repl =~ s/</'+JSlt+'/g;
$repl =~ s/>/'+JSgt+'/g;
## removed language=\"JavaScript\" for XHTML
$orig = "<script type=\"text/javascript\">JSlt=unescape('%3C');JSgt=unescape('%3E');document.write('" .
$repl . "');</script>";
## may be you want to add this
#$orig .= "<noscript>$text ($email)</noscript>";
JavaScript.pm view on Meta::CPAN
# in html-file
<a href="mailto:alex@zeitform.de">alex@zeitform.de</a>
# in browser
<script type="text/javascript">
JSlt=unescape('%3C'); // "<"
JSgt=unescape('%3E'); // ">"
document.write(''+JSlt+'a h'+'ref='+'"mai'+'lto:'+'alex'+'@zei'+'tfor'+
'm.de'+'"'+JSgt+'al'+'ex@z'+'eitf'+'orm.'+'de'+JSlt+'/'+
'a'+JSgt+'');
</script>
view all matches for this distribution
view release on metacpan or search on metacpan
Mercury/Base.pm view on Meta::CPAN
my $errmsg = $_[0] ? $_[0] : ": ".$@;
$self->{r}->log_error((ref($self)||$self).$errmsg)
if ref $self->{r} and $self->{r}->can("log_error");
}
sub uri_escape_noamp {
return uri_escape($_[1], '^;/?:@=+\$,A-Za-z0-9\-_.!~*\'()');
}
sub get_date {
my @date = localtime($_[1] ? $_[1] : time);
# my $midnighttime = mktime(0, 0, 0, @date[3, 4, 5], 0, 0, 0);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AppSamurai.pm view on Meta::CPAN
# Make sure there is at least one value, which can be empty
(scalar(@values)) or ($values[0] = '');
foreach $value (@values) {
if ($MP eq 1) {
push(@pairs, Apache::Util::escape_uri($name) . '=' .
Apache::Util::escape_uri($value));
} else {
# Assume mod_perl 2 behaviour
push(@pairs, Apache2::Util::escape_path($name, $r->pool) .
'=' . Apache2::Util::escape_path($value, $r->pool));
}
}
}
$r->args(join '&', @pairs) if scalar(@pairs) > 0;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AuthCookie.pm view on Meta::CPAN
use Carp;
use mod_perl qw(1.07 StackedHandlers MethodHandlers Authen Authz);
use Apache::Constants qw(:common M_GET FORBIDDEN OK REDIRECT);
use Apache::AuthCookie::Params;
use Apache::AuthCookie::Util qw(is_blank is_local_destination);
use Apache::Util qw(escape_uri);
use Apache::URI;
use Encode ();
sub recognize_user ($$) {
lib/Apache/AuthCookie.pm view on Meta::CPAN
# we dont want to copy login data, only extra data
next if $name eq 'destination'
or $name =~ /^credential_\d+$/;
for my $v ($args->param($name)) {
push @pairs, escape_uri($name) . '=' . escape_uri($v);
}
}
$r->args(join '&', @pairs) if scalar(@pairs) > 0;
lib/Apache/AuthCookie.pm view on Meta::CPAN
sub untaint_destination {
my ($self, $dest) = @_;
return Apache::AuthCookie::Util::escape_destination($dest);
}
sub logout($$) {
my ($self, $r) = @_;
lib/Apache/AuthCookie.pm view on Meta::CPAN
URL contained in the C<"destination"> submitted form field.
=head2 untaint_destination($uri)
This method returns a modified version of the destination parameter
before embedding it into the response header. Per default it escapes
CR, LF and TAB characters of the uri to avoid certain types of
security attacks. You can override it to more limit the allowed
destinations, e.g., only allow relative uris, only special hosts or
only limited set of characters.
lib/Apache/AuthCookie.pm view on Meta::CPAN
=item *
Due to the way HTTP works, cookies cannot contain non-ASCII characters.
Because of this, if you are including the username in your generated session
key, you will need to escape any non-ascii characters in the session key
returned by L</authen_cred()>.
=item *
Similarly, you must reverse this escaping process in L</authen_ses_key()> and
view all matches for this distribution
view release on metacpan or search on metacpan
AuthCookiePAM.pm view on Meta::CPAN
use Apache;
use Apache::Table;
use Apache::Constants qw(:common M_GET FORBIDDEN REDIRECT);
use Apache::AuthCookie::Util;
use Apache::Util qw(escape_uri);
use Apache::AuthCookie;
use Authen::PAM;
use vars qw( @ISA );
@ISA = qw( Apache::AuthCookie );
AuthCookiePAM.pm view on Meta::CPAN
# we dont want to copy login data, only extra data
next if $name eq 'destination'
or $name =~ /^credential_\d+$/;
$value = '' unless defined $value;
push @pairs, escape_uri($name) . '=' . escape_uri($value);
}
$r->args(join '&', @pairs) if scalar(@pairs) > 0;
$r->method('GET');
$r->method_number(M_GET);
view all matches for this distribution
view release on metacpan or search on metacpan
# Strip possible quotes
$ticket =~ s,^"|"$,,g;
return if length($ticket) < 40;
# Assume $ticket is not URL-escaped but may be base64-escaped
my $raw = $ticket =~ m/!/ ? $ticket : decode_base64($ticket);
# If $raw still doesn't have ! then it is bogus
return if $raw !~ m/!/;
view all matches for this distribution
view release on metacpan or search on metacpan
eg/login.pl view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use Apache::Util qw( escape_uri );
my $Protected = 'http://example.com/login-protected';
my $r = Apache->request;
$r->status(200);
my $prev = $r->prev;
eg/login.pl view on Meta::CPAN
}
my $token = $prev->dir_config('TypeKeyToken');
my $tk_url = $prev->dir_config('TypeKeyURL') ||
'https://www.typekey.com/t/typekey/login';
$uri = escape_uri("$Protected?destination=" . escape_uri($uri));
my $html = <<HTML;
<html>
<head>
<title>Login</title>
view all matches for this distribution
view release on metacpan or search on metacpan
AuthzLDAP.pm view on Meta::CPAN
if ($member =~ /^[^=]+="([^"]+)",/) {
$member = $1;
$r->log->debug("check_group: Setting quoted $member");
} elsif ($member =~ /^[^=]+=([^,]+),/) {
$member = $1;
$r->log->debug("check_group: Examining escaped $member");
$member =~ s/\\(.)/$1/g;
$r->log->debug("check_group: Setting escaped $member");
}
$r->log->debug("check_group: Member now $member");
my ($result, $child_group) = check_group($r, $ld, $basedn, $groupattrtype,
$memberattrtype, $userinfo,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AxKit/Language/XSP/ObjectTaglib.pm view on Meta::CPAN
Similarly, the C<code> tag calls the C<code> method on the same object.
The C<description> and C<summary> tags call the C<description> and C<summary>
methods on each course object with the loop, this time making sure that the
result is valid XML instead of plain text. (This is because we store the
description in the database as XML, and don't want it escaped before AxKit
throws it onto the page.)
}, {
tag => 'presentations',
target => 'course',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/AxKit/Plugin/Session.pm view on Meta::CPAN
unless ($authen_script = $r->dir_config($auth_name.'LoginScript')) {
$r->log_reason("PerlSetVar '${auth_name}LoginScript' missing", $r->uri);
return SERVER_ERROR;
}
my $uri = uri_escape($r->uri);
$authen_script =~ s/((?:[?&])destination=)/$1$uri/;
$self->debug(3,"Internally redirecting to $authen_script");
$r->custom_response(FORBIDDEN, $authen_script);
return FORBIDDEN;
}
view all matches for this distribution