Apache

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Defending web applications against dictionary attacks

    6 answers - 165 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    just wanted to know what you guys thoughts are on this issue and how, if at
    all, you handle it with your own sites?
    regards
    Andrew
  • No.1 | | 510 bytes | |

    Andrew Madu :
    Hi,
    just wanted to know what you guys thoughts are on this issue and how,
    if at all, you handle it with your own sites?
    CAPTCHA [1] might help. BTW, there is built-in support in cocoon. See
    samples here: [2] [3].

    Best Regards,

    Antonio Gallardo.

    regards

    Andrew

    [1]
    [2]

    [3]

    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org
  • No.2 | | 1755 bytes | |

    Antonio,
    many thanks for the information. Unfortunately the documentation links for
    the captcha block and captchareader do not work!! So I am working in the
    dark here!! What I have so far is:

    1. In my xml validations definitions file:

    <fd:captcha id="f1" required="true">
    <fd:label>Copy the number shown into the input field</fd:label>
    <fd:datatype base="string"/>
    <fd:validation>
    <fd:captcha/>
    </fd:validation>
    </fd:captcha>
    2. In my jxt file:

    <ft:widget id="f1">
    <fi:styling listbox-size="30" class="keyinbox"/>
    </ft:widget>

    When I submit the form the validation works, validation.captcha.mismatch,
    the only problem being that I don't know how to display the generated
    captcha image that needs to be entered!!! Do you or anyone else know how to
    do this?

    Secondly is it possible to set properties of the captchareader in the
    sitemap so as to control the height, width, background color, font type etc
    etc etc of the captcha image and if so how can I do that?

    regards

    Andrew

    07/07/06, Antonio Gallardo <agallardo (AT) agssa (DOT) netwrote:

    Andrew Madu :
    Hi,
    just wanted to know what you guys thoughts are on this issue and how,
    if at all, you handle it with your own sites?
    CAPTCHA [1] might help. BTW, there is built-in support in cocoon. See
    samples here: [2] [3].

    Best Regards,

    Antonio Gallardo.

    regards

    Andrew

    [1]
    [2]

    [3]

    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org
    --
  • No.3 | | 3264 bytes | |

    Hi Andrew,

    Andrew Madu wrote:

    1. In my xml validations definitions file:

    <fd:captcha id="f1" required="true">
    <fd:label>Copy the number shown into the input field</fd:label>
    <fd:datatype base="string"/>
    <fd:validation>
    <fd:captcha/>
    </fd:validation>
    </fd:captcha>

    According to the samples in cocoon 2.1.9 this is correct.

    2. In my jxt file:

    <ft:widget id="f1">
    <fi:styling listbox-size="30" class="keyinbox"/>
    </ft:widget>

    Yep seems fine.

    When I submit the form the validation works,
    validation.captcha.mismatch, the only problem being that I don't know
    how to display the generated captcha image that needs to be entered!!!
    Do you or anyone else know how to do this?

    Yes you can find this in the samples when you build cocoon 2.1.9.

    Secondly is it possible to set properties of the captchareader in the
    sitemap so as to control the height, width, background color, font type
    etc etc etc of the captcha image and if so how can I do that?

    Yes it is. I you use an SVG for the captcha image you can modify all these properties.

    You will have to have something like this in your sitemap:

    <!--
    | Generate the CAPTCHA image. Any type of generator can be used here,
    | as long as it reads the string to display from the session
    | attribute named "captcha-{1}".
    | Using an SVG file as input requires that the Batik block be
    | included in the build.

    <map:match pattern="captchajpg">
    <map:generate type="jx" src="captcha-image.xml">
    <map:parameter name="value" value="{session-attr:captcha-{1}}"/>
    </map:generate>
    <map:serialize type="svg2jpeg"/>
    </map:match>

    With the following captcha-image.xml

    <svg width="210" height="75">
    <defs>
    <filter id="blur2">
    <feGaussianBlur stdDeviation="2"/>
    </filter>
    </defs>
    <g id="imagegroup">
    <text style="fill:#0086B3;font-size:42;font-family:Courier;filter:url(#blur2);" x="0"
    y="48">#{$cocoon/parameters/value}</text>
    </g>
    </svg>

    I hope this helps you out a bit more. It's best if you take a look at the samples in Cocoon. It will give you a nice
    code overview of how to enable captcha for you website.

    Regards,

    Reijn

    regards

    Andrew

    07/07/06, *Antonio Gallardo* <agallardo (AT) agssa (DOT) net
    <mailto:agallardo (AT) agssa (DOT) net>wrote:

    Andrew Madu :
    Hi,
    just wanted to know what you guys thoughts are on this issue and how,
    if at all, you handle it with your own sites?
    CAPTCHA [1] might help. BTW, there is built-in support in cocoon. See
    samples here: [2] [3].

    Best Regards,

    Antonio Gallardo.

    regards

    Andrew

    [1]
    [2]

    [3]

    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    <mailto:users-unsubscribe (AT) cocoon (DOT) apache.org>
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org
    <mailto:users-help (AT) cocoon (DOT) apache.org>
  • No.4 | | 4499 bytes | |

    Hi Jeroen,
    right I am now generating an image but the image is just white, there is no
    text to be read. What I have done is as follows:

    sitemap:

    <map:match pattern="captcha.svg">
    <map:generate type="jx" src="jx/svg_captcha.jx">
    <map:parameter name="value" value="{session-attr:captcha}"/>
    </map:generate>
    <map:serialize type="svg2jpeg"/>
    </map:match>

    svg_capture.jx:

    <svg width="50" height="50">
    <defs>
    <filter id="blur2">
    <feGaussianBlur stdDeviation="2"/>
    </filter>
    </defs>
    <g id="imagegroup">
    <text
    style="fill:#0086B3;font-size:42;font-family:Courier;filter:url(#blur2);"
    x="0"
    y="48">#{$cocoon/parameters/value}</text>
    </g>

    </svg>

    jx template:

    <img src="captcha.svg" width="50" height="50"/>

    What am I missing here? It seems that #{$cocoon/parameters/value} is not
    working?!?

    regards

    Andrew

    07/07/06, Jeroen Reijn <j.reijn (AT) hippo (DOT) nlwrote:

    Hi Andrew,

    Andrew Madu wrote:

    1. In my xml validations definitions file:

    <fd:captcha id="f1" required="true">
    <fd:label>Copy the number shown into the input
    field</fd:label>
    <fd:datatype base="string"/>
    <fd:validation>
    <fd:captcha/>
    </fd:validation>
    </fd:captcha>

    According to the samples in cocoon 2.1.9 this is correct.

    2. In my jxt file:

    <ft:widget id="f1">
    <fi:styling listbox-size="30" class="keyinbox"/>
    </ft:widget>

    Yep seems fine.
    --
    When I submit the form the validation works,
    validation.captcha.mismatch, the only problem being that I don't know
    how to display the generated captcha image that needs to be entered!!!
    Do you or anyone else know how to do this?

    Yes you can find this in the samples when you build cocoon 2.1.9.
    --
    Secondly is it possible to set properties of the captchareader in the
    sitemap so as to control the height, width, background color, font type
    etc etc etc of the captcha image and if so how can I do that?

    Yes it is. I you use an SVG for the captcha image you can modify all these
    properties.

    You will have to have something like this in your sitemap:

    <!--
    | Generate the CAPTCHA image. Any type of generator can be used
    here,
    | as long as it reads the string to display from the session
    | attribute named "captcha-{1}".
    | Using an SVG file as input requires that the Batik block be
    | included in the build.

    <map:match pattern="captchajpg">
    <map:generate type="jx" src="captcha-image.xml">
    <map:parameter name="value" value="{session-attr:captcha-{1}}"/>
    </map:generate>
    <map:serialize type="svg2jpeg"/>
    </map:match>

    With the following captcha-image.xml

    <svg width="210" height="75">
    <defs>
    <filter id="blur2">
    <feGaussianBlur stdDeviation="2"/>
    </filter>
    </defs>
    <g id="imagegroup">
    <text
    style="fill:#0086B3;font-size:42;font-family:Courier;filter:url(#blur2);"
    x="0"
    y="48">#{$cocoon/parameters/value}</text>
    </g>
    </svg>

    I hope this helps you out a bit more. It's best if you take a look at the
    samples in Cocoon. It will give you a nice
    code overview of how to enable captcha for you website.

    Regards,

    Reijn
    >
    >
    >

    regards

    Andrew

    07/07/06, *Antonio Gallardo* <agallardo (AT) agssa (DOT) net
    <mailto:agallardo (AT) agssa (DOT) net>wrote:

    Andrew Madu :
    Hi,
    just wanted to know what you guys thoughts are on this issue and
    how,
    if at all, you handle it with your own sites?
    CAPTCHA [1] might help. BTW, there is built-in support in cocoon.
    See
    samples here: [2] [3].

    Best Regards,

    Antonio Gallardo.

    regards

    Andrew

    [1]
    [2]

    [3]

    --

    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    <mailto:users-unsubscribe (AT) cocoon (DOT) apache.org>
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org
    <mailto:users-help (AT) cocoon (DOT) apache.org>
    >
    >
    >
  • No.5 | | 807 bytes | |

    Hi Jeroen,

    07/07/06, Jeroen Reijn <j.reijn (AT) hippo (DOT) nlwrote:

    Hi Andrew,
    --
    What am I missing here? It seems that #{$cocoon/parameters/value} is not
    working?!?

    the code I copied into the previous email was just an example. Did you
    check out the cocoon samples?
    Are you getting errors in your logs?

    Yes I checked the cocoon samples and am not getting any errors.

    Could you check a couple of things:
    - What cocoon version are you using?

    Version 2.1.8
    - Is the svg2jpeg serializer defined in your application?

    Yes. I am already using SVG's within my project.
    - Is the Batik block included in your application lib directory?

    Yes, Root\WEB-INF\lib\batik-all-1.6.jar

    HTH

    regards

    Andrew
  • No.6 | | 4282 bytes | |

    Hi Andrew,

    What am I missing here? It seems that #{$cocoon/parameters/value} is not
    working?!?

    the code I copied into the previous email was just an example. Did you check out the cocoon samples?
    Are you getting errors in your logs?

    Could you check a couple of things:
    - What cocoon version are you using?
    - Is the svg2jpeg serializer defined in your application?
    - Is the Batik block included in your application lib directory?

    Regards,

    Reijn

    regards

    Andrew

    07/07/06, *Jeroen Reijn* < j.reijn (AT) hippo (DOT) nl
    <mailto:j.reijn (AT) hippo (DOT) nl>wrote:

    Hi Andrew,

    Andrew Madu wrote:

    1. In my xml validations definitions file:

    <fd:captcha id="f1" required="true">
    <fd:label>Copy the number shown into the input
    field</fd:label>
    <fd:datatype base="string"/>
    <fd:validation>
    <fd:captcha/>
    </fd:validation>
    </fd:captcha>

    According to the samples in cocoon 2.1.9 this is correct.

    2. In my jxt file:

    <ft:widget id="f1">
    <fi:styling listbox-size="30" class="keyinbox"/>
    </ft:widget>

    Yep seems fine.

    When I submit the form the validation works,
    validation.captcha.mismatch, the only problem being that I don't know
    how to display the generated captcha image that needs to be
    entered!!!
    Do you or anyone else know how to do this?

    Yes you can find this in the samples when you build cocoon 2.1.9.

    Secondly is it possible to set properties of the captchareader in the
    sitemap so as to control the height, width, background color,
    font type
    etc etc etc of the captcha image and if so how can I do that?

    Yes it is. I you use an SVG for the captcha image you can modify all
    these properties.

    You will have to have something like this in your sitemap:

    <!--
    | Generate the CAPTCHA image. Any type of generator can be
    used here,
    | as long as it reads the string to display from the session
    | attribute named "captcha-{1}".
    | Using an SVG file as input requires that the Batik block be
    | included in the build.

    <map:match pattern="captchajpg">
    <map:generate type="jx" src=" captcha-image.xml">
    <map:parameter name="value"
    value="{session-attr:captcha-{1}}"/>
    </map:generate>
    <map:serialize type="svg2jpeg"/>
    </map:match>

    With the following captcha-image.xml

    <svg width="210" height="75">
    <defs>
    <filter id="blur2">
    <feGaussianBlur stdDeviation="2"/>
    </filter>
    </defs>
    <g id="imagegroup">
    <text
    style="fill:#0086B3;font-size:42;font-family:Courier;filter:url(#blur2);"
    x="0"
    y="48">#{$cocoon/parameters/value}</text>
    </g>
    </svg>

    I hope this helps you out a bit more. It's best if you take a look
    at the samples in Cocoon. It will give you a nice
    code overview of how to enable captcha for you website.

    Regards,

    Reijn

    regards

    Andrew

    07/07/06, *Antonio Gallardo* <agallardo (AT) agssa (DOT) net
    <mailto:agallardo (AT) agssa (DOT) net>
    <mailto: agallardo (AT) agssa (DOT) net <mailto:agallardo (AT) agssa (DOT) net wrote:

    Andrew Madu :
    Hi,
    just wanted to know what you guys thoughts are on this
    issue and how,
    if at all, you handle it with your own sites?
    CAPTCHA [1] might help. BTW, there is built-in support in
    cocoon. See
    samples here: [2] [3].

    Best Regards,

    Antonio Gallardo.

    regards

    Andrew

    [1]
    [2]

    [3]

    <>

    To unsubscribe, e-mail: users-unsubscribe (AT) cocoon (DOT) apache.org
    <mailto:users-unsubscribe (AT) cocoon (DOT) apache.org>
    <mailto:users-unsubscribe (AT) cocoon (DOT) apache.org
    <mailto:users-unsubscribe (AT) cocoon (DOT) apache.org>>
    For additional commands, e-mail: users-help (AT) cocoon (DOT) apache.org
    <mailto:users-help (AT) cocoon (DOT) apache.org>
    <mailto:users-help (AT) cocoon (DOT) apache.org
    <mailto:users-help (AT) cocoon (DOT) apache.org>>
    --

Re: Defending web applications against dictionary attacks


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Apache"

EMSDN.COM