Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

client-side password validation using regex

questions regarding bibliographic citations?
(11 lines)
Commons VFS FileObject length
(9 lines)
Jul 27, 2010
Stephan.Kuenster
Stephan.Kuenster
Hi all,

I was wondering if it's possible to validate a <html:password> field
on client-side by using a regular expression.
A look at validateMask.js told me that the only field types supported are
'hidden', 'text', 'textarea' and 'file'.

Code:

            if ((field.type == 'hidden' ||
                field.type == 'text' ||
                 field.type == 'textarea' ||
                                 field.type == 'file') &&
                 (field.value.length > 0)) {

                if (!jcv_matchPattern(field.value, oMasked[x][2]("mask")))
{
                    if (i == 0) {
                        focusField = field;
                    }
                    fields[i++] = oMasked[x][1];
                    isValid = false;
                }
            }


Is this the exspected behavior? Is there any reason for not supporting
'password' fields?
If so, how would I validate a password field by using a regex (without
changing the js file on my own :))?

Cheers,


Ref. 324 * Geoinformationszentrum
Tel. 0211 9449-6310 * Fax: 0211 9449-6610
Email: stephan.### @it.nrw.de<mailto:stephan.k### @it.nrw.de>



Reply
Tags: field
Similar Threads
Re: Does this error eman it is an error at your client machine side orthe error at the server side?
thank you.
yes. I am trying to do that and looks like it is fine now when I reduce
the
number of threads.

Nathasha



Re: Does this error eman it is an error at your client machine side orthe error at the server side?
Try running a distributed test to verify that the client machine is not
choking. 

If the error still comes, try reducing the number of threads. 


------Original Message------
From: nathasha
To: JMeter Users List
ReplyTo: JMeter Users List
Subject: Does this error eman it is an error at your client machine side
orthe error at the server side?
Sent: Jul 16, 2010 4:39 AM


hello all,

I did some searchign for the cause of this problem, but couldn't find
anything useful yet.
I am runnign a load test on an image file and I am using 1000 threads
each
will run 60 times per minute.
I need to do it for an hour.
but, I am trying to do it for 10 minutes at first and I see some errors
like
the following.
Does it mean that the machine I am running jmeter encountered some
problems?
or does it mean that the server couldn't handle that many requests?

"Non HTTP response code: java.net.NoRouteToHostException,Non HTTP
response
message: Cannot assign requested address,"

thanks a lot,
Nathasha



Does this error eman it is an error at your client machine side or the error at the server side?
hello all,

I did some searchign for the cause of this problem, but couldn't find
anything useful yet.
I am runnign a load test on an image file and I am using 1000 threads each
will run 60 times per minute.
I need to do it for an hour.
but, I am trying to do it for 10 minutes at first and I see some errors
like
the following.
Does it mean that the machine I am running jmeter encountered some
problems?
or does it mean that the server couldn't handle that many requests?

"Non HTTP response code: java.net.NoRouteToHostException,Non HTTP response
message: Cannot assign requested address,"

thanks a lot,
Nathasha



OPP + Hash on client side
Is there any strategy for using OPP with a hash algorithm on the client
side
to get both uniform distribution of data in the cluster *and* the ability
to
do range queries?

I'm thinking of something like this:

cassKey = (key % 97) + "@" + key;

cassRange = 0 + "@" + range; 1 + "@" + range; ... 96 + "@" + range;

Would something like that work?


setting up route from client side
I am new to Camel and just writing some simple applications to
familiarize myself with Camel.  One question that I have is, is it
possible to define a route for messages from the client side and push
that information to ActiveMQ and have the route be used?  From what I
can tell all routes must be defined at startup, but is this something
that is possible?

Thanks


DO NOT REPLY access allowed if password matches first seven characters of real password
https://issues.apache.org/bugzilla/show_bug.cgi?id=46152

Nick Kew <nic### @webthing.com> changed:

           What    |Removed                     |Added

Created: (AVRO-562) ruby side has busted client handshaking
ruby side has busted client handshaking

Created: (CXF-2867) Do not throw PolicyException when client side uses AddressingFeature(required=fa
Do not throw PolicyException when client side uses
AddressingFeature(required=false) 

Created: (MAPREDUCE-1959) Should use long name for token renewer on the client side
Should use long name for token renewer on the client side

Created: (AMQ-2771) Side effect from AMQ-2094, server listens on host name address, client connects
Side effect from AMQ-2094, server listens on host name address, client
connects to localhost with the same URI

DO NOT REPLY Skip validation query and use JDBC API for validation
https://issues.apache.org/bugzilla/show_bug.cgi?id=48817

--- Comment #9 from Matt Passell <mpass### @grovehillsoftware.com>
2010-07-01 11:41:13 EDT ---
Any feedback on my second patch?  I've been using it in production for
more
than a month now with no obvious issues.  I realize that you guys are
probably
busy getting Tomcat 7 ready otherwise, but if you could take a look
sometime
soon, that would be great.

Thanks,
Matt




DO NOT REPLY Skip validation query and use JDBC API for validation
https://issues.apache.org/bugzilla/show_bug.cgi?id=48817

--- Comment #10 from Mark Thomas <mar### @apache.org> 2010-07-02
14:10:42 EDT ---
(In reply to comment #9)
 Any feedback on my second patch?  I've been using it in production
for more
 than a month now with no obvious issues.  I realize that you guys are
probably
 busy getting Tomcat 7 ready otherwise, but if you could take a look
sometime
 soon, that would be great.

One suggested change. I think you should set the validator class name
rather
than the validator directly so the entire config can be done in the
resource.
Other than that, looks good.




Re: WS-Security - UsernameToken at Server side. Re: [geronimo doc] ws-security at service side
Hello Jarek,

I hope you are doing well.

Can you please review the patch attached on the following JIRA:

https://issues.apache.org/jira/browse/GERONIMO-4642
<https://issues.apache.org/jira/browse/GERONIMO-4642>
I modified it a little (replaced the deprecated
ContextManager.login(String
realm, CallbackHandler callbackHandler))

Please also take a look at

https://issues.apache.org/jira/browse/GERONIMO-5366

when you have time for Axis2/Tomcat part.

Many Thanks,
Rahul


On Wed, Apr 28, 2010 at 3:00 PM, rahul.soa
<rahu### @googlemail.com> wrote:

 Hi Jarek,

 Many Thanks for your support in this.
 Rahul


 On Wed, Apr 28, 2010 at 10:27 AM, Jarek Gawor
<jga### @gmail.com> wrote:

> Hi Rahul,
>
> Will do. It was on my todo list but got distracted by bunch of
other
> things. Thanks for looking at it again.
>
> Jarek
>
> On Wed, Apr 28, 2010 at 4:21 AM, rahul.soa
<rahul### @googlemail.com>
> wrote:
> > Hello Jarek/Devs,
> >
> > Can you please kindly review this patch?
> >
> > Many Thanks,
> > Rahul
> >
> > On Thu, Apr 22, 2010 at 10:35 PM, rahul.soa
<rahu### @googlemail.com>
> > wrote:
> >>
> >> Dear Devs,
> >> I hope you are doing well.
> >> Please comment/apply on the patch
"UsernameToken_ServerSide.txt"
> attached
> >> here https://issues.apache.org/jira/browse/GERONIMO-4642
> >> I also attached on this email too. Look forward to
seeing your
> comments.
> >> Many Thanks in advance,
> >> rahul
> >>
> >>
> >> On Tue, Apr 20, 2010 at 12:32 AM, rahul.soa
<rahul### @googlemail.com>
> >> wrote:
> >>>
> >>> Hello Devs/Jarek,
> >>>
> >>> I have setup the Server side UsernameToken security
in CXF/Jetty
> against
> >>> Geronimo-2.2 based on the patches attached here
> >>> https://issues.apache.org/jira/browse/GERONIMO-4642
> >>>
> >>> I have attached the new patch named
"UsernameToken_ServerSide.txt" on
> the
> >>> above JIRA, please review and apply it. Let me know
if you want me to
> fix
> >>> something in it.
> >>>
> >>> I look forward to seeing your comment on this patch.
> >>>
> >>>
> >>> Many Thanks,
> >>> Rahul
> >>>
> >>>
> >>>
> >>> On Sat, Mar 27, 2010 at 12:39 AM, rahul.soa
<rahul### @googlemail.com
> >
> >>> wrote:
> >>>>
> >>>> Hello Jeff,
> >>>>
> >>>> Thanks for your mail.
> >>>>
> >>>> I think code (not all the patches) is not
committed yet for the
> same. I
> >>>> will try to build latest of Geronimo and will
create the same patches
> (at
> >>>> lest more simplified) which are not committed
from that JIRA.
> >>>>
> >>>> Many Thanks,
> >>>> rahul
> >>>>
> >>>>
> >>>> On Fri, Mar 26, 2010 at 6:52 AM, chi runhua
<chiru### @gmail.com>
> wrote:
> >>>>>
> >>>>> The document was written based on [1], you
may take a look at this
> JIRA
> >>>>> for the details.
> >>>>>
> >>>>> Anything we should update the doc
accordingly, please let us know.
> >>>>>
> >>>>> [1] 
https://issues.apache.org/jira/browse/GERONIMO-4642
> >>>>>
> >>>>> Jeff
> >>>>>
> >>>>> On Fri, Mar 26, 2010 at 5:31 AM, rahul.soa
<
> rahu### @googlemail.com>
> >>>>> wrote:
> >>>>>>
> >>>>>> Hi Jarek/everyone,
> >>>>>>
> >>>>>> I hope you are doing well.
> >>>>>>
> >>>>>> I am trying to run a sample for securing
web-service but that did
> not
> >>>>>> work.
> >>>>>>
> >>>>>> I am not sure if this works now
> >>>>>>
> >>>>>> "Enabling WS-Security at service side"
> >>>>>>
http://cwiki.apache.org/GMOxDOC22/securing-web-service.html
> >>>>>>
> >>>>>>
> >>>>>> <servlet>
> >>>>>>
<servlet-name>CalculatorService</servlet-name>
> >>>>>> <ws-security-binding>
> >>>>>>
<security-realm-name>geronimo-admin</security-realm-name>
> >>>>>> <property
name="wss4j.in.action">UsernameToken</property>
> >>>>>> </ws-security-binding>
> >>>>>> </servlet>
> >>>>>> I don't see the above in the jetty
schema.
> >>>>>>
> >>>>>> Or I am missing something? Can you
please correct me?
> >>>>>>
> >>>>>> Many Thanks,
> >>>>>> rahul
> >>>>
> >>>
> >>
> >
> >
>




Using Regex
All,

 

I am using pig embedded in Java and need to use matches in my pig job.
However when I try to use escape characters in the pig line, the
compiler complains. How do I use complex regex while embedding?

 

Sample code that is throwing errors:

 

myServer.registerQuery("filtered = FILTER firstcut BY dIP matches
'\Q34.21.12.*\E';");

 

error: invalid escape sequence.

 

Thanks,

 

Matt

 



Using variables in regex
Well, how do I use the content of a variable in regex?

$username = "user1"
file {  "userdata.tar.bz2":
                source => "puppet://$server/modules/$module/
userdata.tar.bz2",
                ensure => $users ? {
                                /$username/ => absent,
                                default => present,
                        },
}

$users is a custom fact that contains all local users:

users => at avahi bin daemon dnsmasq ftp games haldaemon lp mail
messagebus nobody ntp polkituser postfix pulse root sshd suse uuidd
wwwrun man news uucp puppet user1

When I hardcode "user1" into the regex my test works fine and the file
is removed.

But things like /$variable/ or /\$variable/ or /#{variable}/ just
don't work.
Is it even possible in version 0.25.4?





Ask a question about regex in CRS
Hi, everyone
    The following rule comes from
rules/base_rules/modsecurity_crs_41_sql_injection_attacks.conf , but I
don't understand what does the regular expression "(?:[\\\(\)\%#]|--)"
mean. What's the meaning of "\%" in a regex?

SecRule MATCHED_VAR "(?:[\\\(\)\%#]|--)"
        
"t:none,setvar:'tx.msg=%{rule.msg}',setvar:tx.sql_injection_score=+%{tx.critical_anomaly_score},setvar:tx.anomaly_score=+%{tx.critical_anomaly_score},setvar:tx.%{rule.id}-WEB_ATTACK/SQL_INJECTION-%{matched_var_name}=%{tx.0}"


Issues with Node Regex

I am trying to match groups of nodes - i.e.

Node: synd1-path2.path2.some.domain
Node: synd2-path2.path2.some.domain

By using either of the node definitions below:

node /^synd\w+\.path2\.some\.domain$/ {
    include ibapps
    include db
}


Using Regex in Embedded Pig in Java
All,

 

I am using pig embedded in Java and need to use matches in my pig job.
However when I try to use escape characters in the pig line, the
compiler complains. How do I use complex regex while embedding?

 

Sample code that is throwing errors:

 

myServer.registerQuery("filtered = FILTER firstcut BY dIP matches
'\Q34.21.12.*\E';");

 

error: invalid escape sequence.

 

Thanks,

 

Matt