view release on metacpan or search on metacpan
lib/Apache/SdnFw/lib/DB.pm view on Meta::CPAN
my $dbh = $s->{dbh};
my $table = shift;
my $data = shift;
my $keyfield = shift;
my (@keys,@values,$key,@bind);
foreach $key (keys %$data) {
next if ($data->{$key} eq '');
next if ($data->{$key} eq 'NULL');
push @keys, qq($key);
if ($data->{$key} =~ m/^_raw:(.+)$/) {
push @bind, $1;
next;
}
push @bind, '?';
push @values, $data->{$key};
}
my $columns = join ',', @keys;
my $bind = join ',', @bind;
my $query = qq|INSERT INTO $table ($columns) VALUES ($bind)|;
if ($keyfield) {
$query .= " RETURNING $keyfield";
}
my $st = debug_start($s,$query,(join ' ', caller)); # if (defined($s->{dbdbf}));
view all matches for this distribution
view release on metacpan or search on metacpan
demo/httpdconf/httpd.sec1.conf view on Meta::CPAN
# would only count as 1 request towards this limit.
#
MaxRequestsPerChild 0
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
#Listen 3000
#Listen 12.34.56.78:80
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/LDAP.pm view on Meta::CPAN
#scope => 'base',
attrs => [ $args->{ldapAttributeContent}, $args->{ldapAttributeId} ],
);
$ldap->unbind();
$ldap->disconnect();
if ( $msg->code ) {
Apache::Session::Browseable::Store::LDAP->logError($msg);
}
lib/Apache/Session/Browseable/LDAP.pm view on Meta::CPAN
. $args->{ldapObjectClass} . ')('
. $args->{ldapAttributeIndex} . '=*))',
attrs => [ $args->{ldapAttributeId}, $args->{ldapAttributeContent} ],
);
$ldap->unbind();
if ( $msg->code ) {
Apache::Session::Browseable::Store::LDAP->logError($msg);
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
$self->{args}->{ldapAttributeId} => $session->{data}->{_session_id},
$self->{args}->{ldapAttributeContent} => $session->{serialized},
],
);
$self->ldap->unbind() && delete $self->{ldap};
$self->logError($msg) if ( $msg->code );
}
sub update {
my $self = shift;
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
. $self->{args}->{ldapConfBase},
replace =>
{ $self->{args}->{ldapAttributeContent} => $session->{serialized}, },
);
$self->ldap->unbind() && delete $self->{ldap};
$self->logError($msg) if ( $msg->code );
}
sub materialize {
my $self = shift;
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
filter => '(objectClass=' . $self->{args}->{ldapObjectClass} . ')',
scope => 'base',
attrs => [ $self->{args}->{ldapAttributeContent} ],
);
$self->ldap->unbind() && delete $self->{ldap};
$self->logError($msg) if ( $msg->code );
eval {
$session->{serialized} = $msg->shift_entry()
->get_value( $self->{args}->{ldapAttributeContent} );
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
$self->ldap->delete( $self->{args}->{ldapAttributeId} . "="
. $session->{data}->{_session_id} . ","
. $self->{args}->{ldapConfBase} );
$self->ldap->unbind() && delete $self->{ldap};
}
sub ldap {
my $self = shift;
return $self->{ldap} if ( $self->{ldap} );
lib/Apache/Session/Store/LDAP.pm view on Meta::CPAN
return;
}
}
# Bind with credentials
my $bind = $ldap->bind( $self->{args}->{ldapBindDN},
password => $self->{args}->{ldapBindPassword} );
if ( $bind->code ) {
$self->logError($bind);
return;
}
$self->{ldap} = $ldap;
return $ldap;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/MariaDB.pm view on Meta::CPAN
Apache::Session::Lock::MariaDB for more details.
It's based on L<Apache::Session::MySQL> but uses L<DBD::MariaDB> instead
of L<DBD::mysql>. The initial reason to create this new module is that
L<DBD::MariaDB> requires to explicitly indicate C<a_session> column as
binary in L<DBI>'s bind_param calls, which is different from L<DBD::mysql>
and thus L<Apache::Session::MySQL> doesn't support it.
=head1 AUTHOR
Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/SQLite3.pm view on Meta::CPAN
INSERT INTO $self->{'table_name'} (id, a_session, LastUpdated)
VALUES (?, ?, ?)
]);
}
$self->{insert_sth}->bind_param(1, $session->{data}->{_session_id}, SQL_CHAR);
$self->{insert_sth}->bind_param(2, $session->{serialized}, SQL_BLOB);
$self->{insert_sth}->bind_param(3, time, SQL_INTEGER);
$self->{insert_sth}->execute;
$self->{insert_sth}->finish;
}
lib/Apache/Session/Store/SQLite3.pm view on Meta::CPAN
SET a_session = ?, LastUpdated = ?
WHERE id = ?
]);
}
$self->{update_sth}->bind_param(1, $session->{serialized}, SQL_BLOB);
$self->{update_sth}->bind_param(2, time, SQL_INTEGER);
$self->{update_sth}->bind_param(3, $session->{data}->{_session_id}, SQL_CHAR);
foreach my $count (1..600) {
local $@;
eval { $self->{update_sth}->execute; 1 } and last;
sleep 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Session/Store/DBI.pm view on Meta::CPAN
$self->{insert_sth} =
$self->{dbh}->prepare_cached(qq{
INSERT INTO $self->{'table_name'} (id, a_session) VALUES (?,?)});
}
$self->{insert_sth}->bind_param(1, $session->{data}->{_session_id});
$self->{insert_sth}->bind_param(2, $session->{serialized});
$self->{insert_sth}->execute;
$self->{insert_sth}->finish;
}
lib/Apache/Session/Store/DBI.pm view on Meta::CPAN
$self->{update_sth} =
$self->{dbh}->prepare_cached(qq{
UPDATE $self->{'table_name'} SET a_session = ? WHERE id = ?});
}
$self->{update_sth}->bind_param(1, $session->{serialized});
$self->{update_sth}->bind_param(2, $session->{data}->{_session_id});
$self->{update_sth}->execute;
$self->{update_sth}->finish;
}
lib/Apache/Session/Store/DBI.pm view on Meta::CPAN
$self->{materialize_sth} =
$self->{dbh}->prepare_cached(qq{
SELECT a_session FROM $self->{'table_name'} WHERE id = ?});
}
$self->{materialize_sth}->bind_param(1, $session->{data}->{_session_id});
$self->{materialize_sth}->execute;
my $results = $self->{materialize_sth}->fetchrow_arrayref;
lib/Apache/Session/Store/DBI.pm view on Meta::CPAN
$self->{remove_sth} =
$self->{dbh}->prepare_cached(qq{
DELETE FROM $self->{'table_name'} WHERE id = ?});
}
$self->{remove_sth}->bind_param(1, $session->{data}->{_session_id});
$self->{remove_sth}->execute;
$self->{remove_sth}->finish;
}
view all matches for this distribution
view release on metacpan or search on metacpan
SetWWWTheme.pm view on Meta::CPAN
<B>Search JAC</B><BR><HR>
<DIV align="center">
<form method="POST" action="/cgi-bin/isearch">
<input name="SEARCH_TYPE" type=hidden value="ADVANCED">
<input name="HTTP_PATH" type=hidden value="/WWW">
<input name="DATABASE" type=hidden value="webindex">
<input name="FIELD_1" type=hidden value="FULLTEXT">
<input name="WEIGHT_1" type=hidden value= "1">
<input name="ELEMENT_SET" type=hidden value="TITLE">
<input name="MAXHITS" type=hidden value="50">
<input name="ISEARCH_TERM" size="14" border="0">
view all matches for this distribution
view release on metacpan or search on metacpan
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/Sling/LDAPSynch.pm view on Meta::CPAN
sub ldap_connect {
my ($class) = @_;
$class->{'LDAP'} = Net::LDAP->new( $class->{'LDAPHost'} )
or croak 'Problem opening a connection to the LDAP server!';
if ( defined $class->{'LDAPDN'} && defined $class->{'LDAPPASS'} ) {
my $mesg = $class->{'LDAP'}->bind(
$class->{'LDAPDN'},
password => $class->{'LDAPPASS'},
version => '3'
) or croak 'Problem with authenticated bind to LDAP server!';
}
else {
my $mesg = $class->{'LDAP'}->bind( version => '3' )
or croak 'Problem with anonymous bind to LDAP server!';
}
return 1;
}
#}}}
view all matches for this distribution
view release on metacpan or search on metacpan
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/TestConfig.pm view on Meta::CPAN
documentroot => 'DocumentRoot (default is $ServerRoot/htdocs',
port => 'Port [port_number|select] (default ' . DEFAULT_PORT . ')',
servername => 'ServerName (default is localhost)',
user => 'User to run test server as (default is $USER)',
group => 'Group to run test server as (default is $GROUP)',
bindir => 'Apache bin/ dir (default is apxs -q BINDIR)',
sbindir => 'Apache sbin/ dir (default is apxs -q SBINDIR)',
httpd => 'server to use for testing (default is $bindir/httpd)',
target => 'name of server binary (default is apxs -q TARGET)',
apxs => 'location of apxs (default is from Apache2::BuildConfig)',
startup_timeout => 'seconds to wait for the server to start (default is 60)',
httpd_conf => 'inherit config from this file (default is apxs derived)',
httpd_conf_extra => 'inherit additional config from this file',
lib/Apache/TestConfig.pm view on Meta::CPAN
(map { $_ . '_module_name', "$_ module name"} qw(cgi ssl thread access auth php)),
);
my %filepath_conf_opts = map { $_ => 1 }
qw(top_dir t_dir t_conf t_logs t_state t_pid_file t_conf_file src_dir serverroot
documentroot bindir sbindir httpd apxs httpd_conf httpd_conf_extra
perlpod sslca libmodperl);
sub conf_opt_is_a_filepath {
my $opt = shift;
$opt && exists $filepath_conf_opts{$opt};
lib/Apache/TestConfig.pm view on Meta::CPAN
$self->{APXS} =~ s{/}{\\}g if WIN32;
my $vars = $self->{vars};
$vars->{bindir} ||= $self->apxs('BINDIR', 1);
$vars->{sbindir} ||= $self->apxs('SBINDIR');
$vars->{target} ||= $self->apxs('TARGET');
$vars->{conf_dir} ||= $self->apxs('SYSCONFDIR');
if ($vars->{conf_dir}) {
$vars->{httpd_conf} ||= catfile $vars->{conf_dir}, 'httpd.conf';
lib/Apache/TestConfig.pm view on Meta::CPAN
debug "configuring httpd";
$vars->{target} ||= (WIN32 ? 'Apache.EXE' : 'httpd');
unless ($vars->{httpd}) {
#sbindir should be bin/ with the default layout
#but its eaiser to workaround apxs than fix apxs
for my $dir (map { $vars->{$_} } qw(sbindir bindir)) {
next unless defined $dir;
my $httpd = catfile $dir, $vars->{target};
next unless -x $httpd;
$vars->{httpd} = $httpd;
last;
lib/Apache/TestConfig.pm view on Meta::CPAN
my $vars = $self->{vars};
if (my $build_config = $self->modperl_build_config()) {
if (my $p = $build_config->{MP_AP_PREFIX}) {
for my $bindir (qw(bin sbin)) {
my $httpd = catfile $p, $bindir, $vars->{target};
return $httpd if -e $httpd;
# The executable on Win32 in Apache/2.2 is httpd.exe,
# so try that if Apache.exe doesn't exist
if (WIN32) {
$httpd = catfile $p, $bindir, 'httpd.EXE';
if (-e $httpd) {
$vars->{target} = 'httpd.EXE';
return $httpd;
}
}
lib/Apache/TestConfig.pm view on Meta::CPAN
# between calls, leading to various places in the test suite getting a
# different base port selection.
#
# XXX: There is still a problem if two t/TEST's configure at the same
# time, so they both see the same port free, but only the first one to
# bind() will actually get the port. So there is a need in another
# check and reconfiguration just before the server starts.
#
my $port_memoized;
sub select_first_port {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
TransLDAP.pm view on Meta::CPAN
{
return DECLINED;
}
my $ldap = new Net::LDAPapi($LDAPSERVER,$LDAPPORT);
$ldap->bind_s;
my $filter = "($UIDATTR=$user)";
my @attrs = ($URIATTR);
if ($ldap->search_s($LDAPBASE,LDAP_SCOPE_SUBTREE,$filter,\@attrs,0)
!= LDAP_SUCCESS)
{
$r->warn("Search Failed");
$ldap->unbind;
return DECLINED;
}
if (!$ldap->first_entry)
{
$r->warn("No First Entry");
$ldap->unbind;
return DECLINED;
}
my @uris = $ldap->get_values($URIATTR);
$ldap->unbind;
if ($#uris < 0)
{
$r->warn("No labeledURIs");
return DECLINED;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
clone: function(object) {
return Object.extend({}, object);
}
});
Function.prototype.bind = function() {
var __method = this, args = $A(arguments), object = args.shift();
return function() {
return __method.apply(object, args.concat($A(arguments)));
}
}
Function.prototype.bindAsEventListener = function(object) {
var __method = this, args = $A(arguments), object = args.shift();
return function(event) {
return __method.apply(object, [( event || window.event)].concat(args).concat($A(arguments)));
}
}
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.registerCallback();
},
registerCallback: function() {
this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
},
stop: function() {
if (!this.timer) return;
clearInterval(this.timer);
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.transport.open(this.method.toUpperCase(), this.url,
this.options.asynchronous);
if (this.options.asynchronous)
setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
this.transport.onreadystatechange = this.onStateChange.bind(this);
this.setRequestHeaders();
var body = this.method == 'post' ? (this.options.postBody || params) : null;
this.transport.send(body);
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
var onComplete = this.options.onComplete || Prototype.emptyFunction;
this.options.onComplete = (function(transport, param) {
this.updateContent();
onComplete(transport, param);
}).bind(this);
this.request(url);
},
updateContent: function() {
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
receiver.update(response);
}
if (this.success()) {
if (this.onComplete)
setTimeout(this.onComplete.bind(this), 10);
}
}
});
Ajax.PeriodicalUpdater = Class.create();
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.start();
},
start: function() {
this.options.onComplete = this.updateComplete.bind(this);
this.onTimerEvent();
},
stop: function() {
this.updater.options.onComplete = undefined;
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.decay = (request.responseText == this.lastText ?
this.decay * this.options.decay : 1);
this.lastText = request.responseText;
}
this.timer = setTimeout(this.onTimerEvent.bind(this),
this.decay * this.frequency * 1000);
},
onTimerEvent: function() {
this.updater = new Ajax.Updater(this.container, this.url, this.options);
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
colspan: "colSpan",
rowspan: "rowSpan",
valign: "vAlign",
datetime: "dateTime",
accesskey: "accessKey",
tabindex: "tabIndex",
enctype: "encType",
maxlength: "maxLength",
readonly: "readOnly",
longdesc: "longDesc"
};
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
},
insertContent: function(fragments) {
fragments.each((function(fragment) {
this.element.parentNode.insertBefore(fragment, this.element);
}).bind(this));
}
});
Insertion.Top = Class.create();
Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
},
insertContent: function(fragments) {
fragments.reverse(false).each((function(fragment) {
this.element.insertBefore(fragment, this.element.firstChild);
}).bind(this));
}
});
Insertion.Bottom = Class.create();
Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
},
insertContent: function(fragments) {
fragments.each((function(fragment) {
this.element.appendChild(fragment);
}).bind(this));
}
});
Insertion.After = Class.create();
Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
insertContent: function(fragments) {
fragments.each((function(fragment) {
this.element.parentNode.insertBefore(fragment,
this.element.nextSibling);
}).bind(this));
}
});
/*--------------------------------------------------------------------------*/
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
}
Object.extend(Selector, {
matchElements: function(elements, expression) {
var selector = new Selector(expression);
return elements.select(selector.match.bind(selector)).map(Element.extend);
},
findElement: function(elements, expression, index) {
if (typeof expression == 'number') index = expression, expression = false;
return Selector.matchElements(elements, expression || '*')[index || 0];
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.lastValue = this.getValue();
this.registerCallback();
},
registerCallback: function() {
setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
},
onTimerEvent: function() {
var value = this.getValue();
var changed = ('string' == typeof this.lastValue && 'string' == typeof value
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.lastValue = value;
}
},
registerFormCallbacks: function() {
Form.getElements(this.element).each(this.registerCallback.bind(this));
},
registerCallback: function(element) {
if (element.type) {
switch (element.type.toLowerCase()) {
case 'checkbox':
case 'radio':
Event.observe(element, 'click', this.onElementEvent.bind(this));
break;
default:
Event.observe(element, 'change', this.onElementEvent.bind(this));
break;
}
}
}
}
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
this.effects.push(effect);
if(!this.interval)
this.interval = setInterval(this.loop.bind(this), 15);
},
remove: function(effect) {
this.effects = this.effects.reject(function(e) { return e==effect });
if(this.effects.length == 0) {
clearInterval(this.interval);
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.elementPositioning = this.element.getStyle('position');
this.originalStyle = {};
['top','left','width','height','fontSize'].each( function(k) {
this.originalStyle[k] = this.element.style[k];
}.bind(this));
this.originalTop = this.element.offsetTop;
this.originalLeft = this.element.offsetLeft;
var fontSize = this.element.getStyle('font-size') || '100%';
['em','px','%','pt'].each( function(fontSizeType) {
if(fontSize.indexOf(fontSizeType)>0) {
this.fontSize = parseFloat(fontSize);
this.fontSizeType = fontSizeType;
}
}.bind(this));
this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
this.dims = null;
if(this.options.scaleMode=='box')
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
if(!this.options.endcolor)
this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
if(!this.options.restorecolor)
this.options.restorecolor = this.element.getStyle('background-color');
// init color calculations
this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
},
update: function(position) {
this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
},
finish: function() {
this.element.setStyle(Object.extend(this.oldStyle, {
backgroundColor: this.options.restorecolor
}));
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
element = $(element);
var options = arguments[1] || {};
var oldOpacity = element.getInlineOpacity();
var transition = options.transition || Effect.Transitions.sinoidal;
var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
reverser.bind(transition);
return new Effect.Opacity(element,
Object.extend(Object.extend({ duration: 2.0, from: 0,
afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
}, options), {transition: reverser}));
}
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
style: property,
originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
targetValue: unit=='color' ? parseColor(value) : value,
unit: unit
});
}.bind(this)).reject(function(transform){
return (
(transform.originalValue == transform.targetValue) ||
(
transform.unit != 'color' &&
(isNaN(transform.originalValue) || isNaN(transform.targetValue))
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
this.tracks.push($H({
ids: $H(track).keys().first(),
effect: Effect.Morph,
options: { style: data }
}));
}.bind(this));
return this;
},
play: function(){
return new Effect.Parallel(
this.tracks.map(function(track){
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
// We can't seem to Element.extend our elements in a seperate window... Dunno why yet
// but it makes for uglier code :-(
// Constructor - Parameters are:
// el: Outer div to bind widget to
// meter: uploadmeter id
// url: uploadmeter ajax url
// options: additional callbacks, etc
initialize: function(el, meter, url, options) {
this.url = url;
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
Element.setStyle(this.main, {'border-color': 'yellow'});
Element.update(this.desc, "Unknown");
Element.setStyle(this.ul, {'background-color': 'yellow'}).hide();
Position.clone(this.main, this.ul);
Element.show(this.ul);
}.bind(this);
// New meter
var params = "format=json&meter_id=" + this.meter;
new Ajax.Request(this.url, {
parameters: params,
onSuccess: function(transport) {
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
// Start periodic
params = params + "&returned=1";
this.ajax = new PeriodicalExecuter(function() {
new Ajax.Request(this.url, {
parameters: params,
onSuccess: this.__onSuccess.bind(this)
});}.bind(this), this.options.delay);
}.bind(this),
on404: errorFunc,
on400: errorFunc
}); /* first request */
},
lib/Apache/UploadMeter/Resources/JavaScript.pm view on Meta::CPAN
effect.element.undoClipping();
},
afterFinish: function(effect) {
this.ul.setStyle({width: parseInt(this.ul.getStyle('width')) + parseInt(Element.getStyle(effect.element, 'width')) + "px"});
effect.element.remove();
}.bind(this)
}, arguments[1] || {}));
},
__onSuccess: function(transport) {
var json = eval('(' + transport.responseText + ')');
view all matches for this distribution
view release on metacpan or search on metacpan
Wyrd/Input.pm view on Meta::CPAN
=item regular attributes
Most Input objects also accept the attributes of their HTML
counterparts. For example, B<text>-type Inputs accept name, value,
size, class, id, maxlength, tabindex, accesskey, onchange, onselect,
onblur, etc. Dev Note: Derived classes should maintain this support by
including conditionals in the template (see the code).
=item description
Wyrd/Input.pm view on Meta::CPAN
Built-in templates are text, textarea, password
=cut
sub _template_text {
return '<input type="text" name="$:param" value="$:value"?:size{ size="$:size"}?:class{ class="$:class"}?:style{ style="$:style"}?:id{ id="$:id"}?:maxlength{ maxlength="$:maxlength"}?:tabindex{ tabindex="$:tabindex"}?:accesskey{ accesskey="$:tabinde...
}
sub _template_textarea {
return '<textarea name="$:param"?:cols{ cols="$:cols"}?:rows{ rows="$:rows"}?:wrap{ wrap="$:wrap"}?:id{ id="$:id"}?:class{ class="$:class"}?:style{ style="$:style"}?:tabindex{ tabindex="$:tabindex"}?:accesskey{ accesskey="$:accesskey"}?:onblur{ onbl...
}
sub _template_password {
return '<input type="password" name="$:param" value="$:value"?:size{ size="$:size"}?:id{ id="$:id"}?:maxlength{ maxlength="$:maxlength"}?:class{ class="$:class"}?:style{ style="$:style"}?:tabindex{ tabindex="$:tabindex"}?:accesskey{ accesskey="$:tab...
}
sub _template_hidden {
return '<input type="hidden" name="$:param" value="$:value">';
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache/XPointer/RDQL.pm view on Meta::CPAN
$parser->parse($query);
return (undef,$parser);
}
sub bind {
my $pkg = shift;
my $query = shift;
my @bind = ();
foreach my $var ($query->bind_variables()) {
my ($prefix,$localname) = $query->bind_predicate($var);
my $uri = $query->lookup_namespaceURI($prefix);
push @bind, {localname => $localname,
prefix => $prefix,
namespaceuri => $uri,
value => undef};
}
return \@bind;
}
=head1 VERSION
1.1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/API.pm view on Meta::CPAN
=item C<-auth_module_name>
auth module name
=item C<-bindir>
Apache bin/ dir (default is C<apxs -q BINDIR>)
=item C<-cgi_module_name>
lib/Apache2/API.pm view on Meta::CPAN
Group to run test server as (default is C<$GROUP>)
=item C<-httpd>
server to use for testing (default is C<$bindir/httpd>)
=item C<-httpd_conf>
inherit config from this file (default is apxs derived)
lib/Apache2/API.pm view on Meta::CPAN
=item C<-proxyssl_url>
url for testing ProxyPass / https (default is localhost)
=item C<-sbindir>
Apache sbin/ dir (default is C<apxs -q SBINDIR>)
=item C<-servername>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AUS.pm view on Meta::CPAN
detailed description of Authentication, Users, and Sessions with
Schema::RDBMS::AUS, see L<it's documentation|Schema::RDBMS::AUS>.
Environment variables and some other required settings are documented
there.
This document focuses on how to use the apache2 bindings to access
(or restrict access based upon) Schema::RDBMS::AUs's
users, groups, and sessions:
=head1 ACCESS TO THE SESSION OBJECT
view all matches for this distribution
view release on metacpan or search on metacpan
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
return $ldap_handler if $ldap_handler;
return NULL if defined $ldap_handler;
my $uri = $self->config( $r, C_LDAPURI );
my $binddn = $self->config( $r, C_BINDDN );
my $bindpw = $self->config( $r, C_BINDPW ) || '';
my $ldap_handler = Net::LDAP->new($uri)
or $self->fatal( $r, "Cannot connect to the LDAP server: $!" );
unless ($ldap_handler) {
$ldap_handler = NULL;
return $ldap_handler;
}
if ($binddn) { # bind with a dn/pass
my $msg = $ldap_handler->bind( $binddn, password => $bindpw );
$msg->code && $self->fatal( $r, $msg->error );
}
else { # anonymous bind
my $msg = $ldap_handler->bind();
$msg->code && $self->fatal( $r, $msg->error );
}
return $ldap_handler;
}
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
return NULL unless $self->ldap($r);
my $base = $self->config( $r, C_BASE );
$base =~ s/%USER%/$user/;
my $mesg = $self->ldap($r)->bind( $base, password => $password );
return $mesg->is_error ? 0 : 1;
}
sub rlog {
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
This module acts as an authentication handler under Apache2 environment.
It uses Apache2::AuthCookie as the base class and serves as a backend to
provide user authentication against an LDAP server.
Make sure that you have got a reachable LDAP server and credentials to access it
(ldapuri, base, binddn/bindpw or anonymous bind).
When there is an attempt to access a "protected" directory or location
that has 'require valid-user' option included Apache2::AuthCookieLDAP is used
as the authentication and the authorization handler. It takes a pair of
provided username/password and tries to search the username in the LDAP directory
(it also uses the filter MyAuth_Filter, for puropses where you want to restrict access
to the resource to only a specific group). If the user is found then it tries
to bind with the provided username/password. Once authorized a session key
is generated by taking into account the provided username, authorization time
and a hash generated by including a specific logic plus the user's IP address.
Upon completion the session data is encrypted with the secret key (MyAuth_SecretKey)
and the according cookie is generated by Apache2::AuthCookie.
All the following requests to the protected resource take the cookie (if exists)
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
Example: uid=%USER%,ou=staff,dc=company,dc=com
=item C<MyAuth_BindDN> [optional]
Use the option if your LDAP does not accept anonymous bind
for search.
Example: cn=ldap,dc=company,dc=com
=item C<MyAuth_BindPW> [optional]
If you BindDN then you most likely want to specify
a password here to bind with.
=item C<MyAuth_Cipher> [optinal, default: 'des']
An encryption method used for the session key.
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
Example:
PerlSetVar MyAuth_Base file:/etc/ldap_base.conf:^\s*base\s+(.+)\r*\n$
PerlSetVar MyAuth_BindDN file:/etc/pam_ldap.conf:^\s*binddn\s+(.+)\r*\n$
PerlSetVar MyAuth_BindPW file:/etc/pam_ldap.conf:^\s*bindpw\s+(.+)\r*\n$
Format: "file:<filename>:<regular expression>"
Where $1 will be the variable.
=over 4
lib/Apache2/AuthCookieLDAP.pm view on Meta::CPAN
Performs Net::LDAP->search(base => $base, scope => 'base', filter => $filter)
and returns '1' if the specified $user is found or otherwise '0'.
=head2 ldap_check_user($r, $user, $password)
Performs Net::LDAP->bind($base, password => $password).
(%USER% is replaced by $user in $base)
=head2 rlog($r, $msg)
view all matches for this distribution
view release on metacpan or search on metacpan
AuthNetLDAP.pm view on Meta::CPAN
return $result if $result;
# change based on version of mod_perl
my $user = $r->user;
my $binddn = $r->dir_config('BindDN') || "";
my $bindpwd = $r->dir_config('BindPWD') || "";
my $basedn = $r->dir_config('BaseDN') || "";
my $ldapserver = $r->dir_config('LDAPServer') || "localhost";
my $ldapport = $r->dir_config('LDAPPort') || 389;
my $uidattr = $r->dir_config('UIDAttr') || "uid";
my $allowaltauth = $r->dir_config('AllowAlternateAuth') || "no";
AuthNetLDAP.pm view on Meta::CPAN
$ldap->start_tls(verify => 'none')
or $r->log_error( "Unable to start_tls", $r->uri);
}
my $mesg;
#initial bind as user in Apache config
if ($bindpwd ne "")
{
$mesg = $ldap->bind($binddn, password=>$bindpwd);
}
else
{
$mesg = $ldap->bind();
}
#each error message has an LDAP error code
if (my $error = $mesg->code())
{
AuthNetLDAP.pm view on Meta::CPAN
}
}
}
else
{
$mesg = $ldap->bind($entry->dn(),password=>$password);
}
if (my $error = $mesg->code())
{
$r->note_basic_auth_failure;
$r->log_error("user $user: failed bind: $error",$r->uri);
return Apache2::Const::HTTP_UNAUTHORIZED;
}
my $error = $mesg->code();
my $dn = $entry->dn();
# $r->log_error("AUTHDEBUG user $dn:$password bind: $error",$r->uri);
return Apache2::Const::OK;
}
# Autoload methods go after =cut, and are processed by the autosplit program.
AuthNetLDAP.pm view on Meta::CPAN
=head1 SYNOPSIS
AuthName "LDAP Test Auth"
AuthType Basic
#only set the next two if you need to bind as a user for searching
#PerlSetVar BindDN "uid=user1,ou=people,o=acme.com" #optional
#PerlSetVar BindPWD "password" #optional
PerlSetVar BaseDN "ou=people,o=acme.com"
PerlSetVar LDAPServer ldap.acme.com
PerlSetVar LDAPPort 389
AuthNetLDAP.pm view on Meta::CPAN
=item PerlSetVar AlternatePWAttribute
The an alternate attribute with which the $password will be tested.
This allows you to test with another attribute, instead of just
trying to bind the userdn and password to the ldap server.
If this option is used, then a BindDN and BindPWD must be used for the
initial bind.
=item PerlSetVar AllowAlternateAuth
This attribute allows you to set an alternative method of authentication
(Basically, this allows you to mix authentication methods, if you don't have
AuthNetLDAP.pm view on Meta::CPAN
Then in your httpd.conf file or .htaccess file, in either a <Directory> or <Location> section put:
AuthName "LDAP Test Auth"
AuthType Basic
#only set the next two if you need to bind as a user for searching
#PerlSetVar BindDN "uid=user1,ou=people,o=acme.com" #optional
#PerlSetVar BindPWD "password" #optional
PerlSetVar BaseDN "ou=people,o=acme.com"
PerlSetVar LDAPServer ldap.acme.com
PerlSetVar LDAPPort 389
view all matches for this distribution
view release on metacpan or search on metacpan
AuthTicketLDAP.pm view on Meta::CPAN
sub check_credentials {
my ($self, $user, $password) = @_;
my ($entry, $mesg);
# 1) check_ldap_cache for UID entry. Avoids anonymous search.
# 2) if not in cache, run a search and cache the result
# 3) lastly, bind with supplied password.
$entry = $self->ldap_cache($user) or return 0;
$mesg = $self->ldap->bind($entry->dn(), password => $password)
or die "$@";
if (!$mesg->is_error()) {
return 1;
}
AuthTicketLDAP.pm view on Meta::CPAN
# Store and return stmt result
return $_stmt_cache->set($cache_stmt, $row);
}
sub stmt_cache {
my ($self, $stmt, @bind) = @_;
if (!$stmt) {
return undef;
}
my $cache_stmt = join($CACHE_ENTRY_DELIMITER, $stmt, @bind);
# Retrieve
my $cached_entry = $_stmt_cache->get($cache_stmt);
if ($cached_entry) {
return $cached_entry;
}
my $dbh = $self->dbh;
my $row = eval {
$dbh->selectrow_arrayref($stmt, undef, @bind);
};
if ($@) {
$dbh->rollback;
die $@;
}
AuthTicketLDAP.pm view on Meta::CPAN
# generate SQL
my @fields = ($secret_field, $secret_version_field);
my %where = ( $secret_version_field => $version ) if defined $version;
my $order = " $secret_version_field DESC ";
my ($stmt, @bind) = $self->sql->select($secret_table, \@fields, \%where, $order);
# SQL::Abstract is quoting the version number. DBD::Informix doesn't like that.
@bind = ($version) if $version;
# Originally, had DESC LIMIT 1, which Informix doesn't support.
$stmt =~ s/SELECT/SELECT FIRST 1/;
# Using our statement cache
return @{$self->stmt_cache($stmt, @bind)};
}
sub is_hash_valid {
my ($self, $hash) = @_;
my ($table, $tick_field, $ts_field) = $self->ticket_table;
my ($query, @bind) = $self->sql->select($table, [$tick_field, $ts_field],
{ $tick_field => $hash });
my ($db_hash, $ts) = (undef, undef);
# Using our statement cache
($db_hash, $ts) = @{$self->stmt_cache($query, @bind) || []};
if ($ts) {
$self->{DBTicketTimeStamp} = $ts; # cache for later use.
}
AuthTicketLDAP.pm view on Meta::CPAN
my $dbh = $self->dbh;
my ($table, $tick_field, $ts_field) = $self->ticket_table;
my ($query, @bind) = $self->sql->update($table,
{$ts_field => $time},
{$tick_field => $hash});
eval {
my $sth = $dbh->do($query, undef, @bind);
$dbh->commit unless $dbh->{AutoCommit};
};
if ($@) {
$dbh->rollback;
die $@;
AuthTicketLDAP.pm view on Meta::CPAN
an illusion -- cached files are only mapped into memory once.
LDAP authentication processing works similarly to mod_ldap/mod_authnz_ldap.
1) An anonymous search looks up a user on the LDAP server.
Returns 403 if unsuccessful. Otherwise, the entry is cached.
2) That user's LDAP entry DN and password is used to bind to
the server. Returns 403 if unsuccessful, OK if successful.
On the database side, everything works the same as I<Apache2::AuthTicket> except
that users are authenticated and authorized with LDAP instead.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthZLDAP.pm view on Meta::CPAN
PerlSetVar LDAPTLScapath /path/to/cadir
# Set to a file that contains the CA cert
PerlSetVar LDAPTLScafile /path/to/cafile.pem
# Specifies a user/password to use for the bind
# If LDAPuser is not specified, AuthZLDAP will attempt an anonymous bind
PerlSetVar LDAPuser cn=user,o=org
PerlSetVar LDAPpassword secret
# Sets the LDAP search scope
# (base|one|sub)
lib/Apache2/AuthZLDAP.pm view on Meta::CPAN
if($LDAPTLS ne "yes" && $LDAPTLS ne "no"){
$LDAPTLS="no";
}
## bind
my $LDAPuser = $r->dir_config('LDAPuser');
my $LDAPpassword = $r->dir_config('LDAPpassword');
## baseDN and Filters
my $LDAPbaseDN = $r->dir_config('LDAPbaseDN');
lib/Apache2/AuthZLDAP.pm view on Meta::CPAN
$r->log_error("Apache2::AuthZLDAP : $location, LDAP error could not start TLS : ".$mesg->error);
}
return Apache2::Const::HTTP_UNAUTHORIZED;
}
## user password bind if configured else anonymous
if (defined $LDAPuser and defined $LDAPpassword){
$mesg = $session->bind($LDAPuser,password=>$LDAPpassword);
}else{
$mesg = $session->bind();
}
if($mesg->code){
my $err_msg = 'LDAP error cannot bind ';
if (defined $LDAPuser){
$err_msg .= "as $LDAPuser";
}else{
$err_msg .= 'anonymously';
}
lib/Apache2/AuthZLDAP.pm view on Meta::CPAN
$r->log_error("Apache2::AuthZLDAP : $location, LDAP error could not search : ".$mesg->error);
return Apache2::Const::HTTP_UNAUTHORIZED;
}
if ($mesg->count != 0){
$r->log->notice("Apache2::AuthZLDAP : $user authorized to access $location");
$session->unbind;
return Apache2::Const::OK;
}else{
$session->unbind;
$r->log_error("Apache2::AuthZLDAP : $user not allowed to access $location");
return Apache2::Const::HTTP_UNAUTHORIZED;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/AuthZSympa.pm view on Meta::CPAN
unless($ldap = Net::LDAP->new($ldap_host)){
$r->log_error("Apache2::AuthZSympa : $location, unable to create Net::LDAP object with $ldap_host");
return "";
}
my $mesg;
unless($mesg = $ldap->bind){
$r->log_error("Apache2::AuthZSympa : $location, unable to bind $ldap_host");
return "";
}
my $filter = $uid_filter;
$filter =~ s/\[uid\]/$user/;
$mesg = $ldap->search( # perform a search
lib/Apache2/AuthZSympa.pm view on Meta::CPAN
filter => $filter,
);
my $nb_entries = $mesg->count;
if(($nb_entries == 0) | ($nb_entries>1)){
$r->log->notice("Apache2::AuthZSympa : $location, $nb_entries entries returned while querying $ldap_host, maybe wrong parameter ?");
$ldap->unbind;
return "";
}
my $entry = $mesg->entry(0);
my $mail_user = $entry->get_value($attribute);
$ldap->unbind;
return $mail_user;
}
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
AuthenMSAD.pm view on Meta::CPAN
$r->note_basic_auth_failure;
$r->log_reason("user - MSAD LDAP Connect Failed",$r->uri);
return Apache2::Const::HTTP_UNAUTHORIZED;
}
my $result= $ldap->bind (dn => "$user\@$domain", password => $pass);
if (!$result || ($result && $result->code)) {
$r->note_basic_auth_failure;
$r->log_reason("user - Active Directory Authen Failed",$r->uri);
return Apache2::Const::HTTP_UNAUTHORIZED;
}
view all matches for this distribution
view release on metacpan or search on metacpan
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
view all matches for this distribution
view release on metacpan or search on metacpan
av_store|||
av_undef|||
av_unshift|||
ax|||n
bad_type|||
bind_match|||
block_end|||
block_gimme||5.004000|
block_start|||
boolSV|5.004000||p
boot_core_PerlIO|||
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Controller/SQL/MySQL.pm view on Meta::CPAN
=item on_dup_sql
Optional string of SQL for after 'ON DUPLICATE KEY UPDATE'.
Format it yourself.
=item on_dup_bind
Array ref of bind values for extra C<?> characters in C<on_dup_sql>.
=back
=cut
lib/Apache2/Controller/SQL/MySQL.pm view on Meta::CPAN
use Apache2::Controller::X;
sub insert_hash {
my ($self, $p) = @_;
my ($table, $data, $on_dup_sql, $on_dup_bind) = @{$p}{qw(
table data on_dup_sql on_dup_bind
)};
my @bind = values %{$data};
my $sql
= "INSERT INTO $table SET\n"
. join(",\n", map {" $_ = ".(ref $_ ? $_ : '?')} keys %{$data});
if ($on_dup_sql) {
$sql .= "\nON DUPLICATE KEY UPDATE\n$on_dup_sql\n";
push @bind, @{$on_dup_bind} if $on_dup_bind;
}
my $dbh = $self->{dbh};
my $id;
eval {
DEBUG("preparing handle for sql:\n$sql\n---\n");
my $sth = $dbh->prepare_cached($sql);
$sth->execute(@bind);
($id) = $dbh->selectrow_array(q{ SELECT LAST_INSERT_ID() });
};
if ($EVAL_ERROR) {
a2cx message => "database error: $EVAL_ERROR",
dump => { sql => $sql, bind => \@bind, };
}
return $id;
}
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/EmbedFLV/Template.pm view on Meta::CPAN
* You should have received a copy of the GNU General Public License
* along with Flowplayer. If not, see <http://www.gnu.org/licenses/>.
*
* Version: 3.0.3 - Wed Jan 07 2009 13:22:30 GMT-0000 (GMT+00:00)
*/
(function(){function log(args){console.log("$f.fireEvent",[].slice.call(args));}function clone(obj){if(!obj||typeof obj!='object'){return obj;}var temp=new obj.constructor();for(var key in obj){if(obj.hasOwnProperty(key)){temp[key]=clone(obj[key]);}}...
self=this,api=null,html,commonClip,playlist=[],plugins={},listeners={},playerId,apiId,playerIndex,activeIndex,swfHeight,wrapperHeight;extend(self,{id:function(){return playerId;},isLoaded:function(){return(api!==null);},getParent:function(){return wr...
view all matches for this distribution
view release on metacpan or search on metacpan
t/htdocs/index.200.html view on Meta::CPAN
<li><a href="handler.html">Handlers</a></li>
<li><a href="programs/">Server and Supporting Programs</a></li>
<li><a href="glossary.html">Glossary</a></li>
</ul>
</div></td><td> sup! <div class="category"><h2><a name="usersguide" id="usersguide">Users' Guide</a></h2>
<ul><li><a href="bind.html">Binding</a></li>
<li><a href="configuring.html">Configuration Files</a></li>
<li> sup! <a href="sections.html">Configuration Sections</a></li>
<li><a href="caching.html">Content Caching</a></li>
<li><a href="content-negotiation.html">Content Negotiation</a></li>
<li><a href="dso.html">Dynamic Shared Object sup! s (DSO)</a></li>
view all matches for this distribution