• last updated 3 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve robustness of xowf.create_test_items automated test: make sure that the exercise appearing is actually supposed to render 2 images

Fixes xowf.create_test_items automated test

Compute amplitude and wavelength explicitly in pixels and make it stable with respect to the captcha size, introduce a random offset for the wave instead

Fixes acs-templating.tesseract_cannot_crack_catpcha automated test

Fix typo

Fix tag

Minor modernization

- use atomic stack operations to reduce locks and avoid race conditions

- improve spelling

- break overlong lines

- better align comments with actual code

refactor code

    • -20
    • +44
    /openacs-4/packages/xowiki/tcl/package-procs.tcl
    • -35
    • +8
    /openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
Make creation of ::xo::cc more robust

In case the argument processing of

ConnectionContext create ::xo::cc -p1 ... -p2 ....

::xo::cc destroy_on_cleanup

runs into an exception leading to an ad_script_abort, the half-in

initialized object without cleanup definition will survive. At later

times, this object might be reused, containing potentially

cached results from earlier runs, which can cause troubles in error

cases.

This change takes care that errors during argument processing will

not leave half-initialized objects behind.

improve wording in comments

use "ns_strcoll" for ordered composite when available

improve wording

safetybelt for acunetix testing: refetch parameter page, when it is not initialized

hopefully a temporary measure

    • -1
    • +9
    /openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
Do not consider unchecked radio buttons as form values, or when an unselected radio exists, the last value will might be picked

Fixes xowiki.create_form_with_form_instance, breaks xowf.create_test_items

Test reproducing an upstream use case: a compound field made of both regular, and compound field, with the compound field also repeated

This test exposes a bug in the acs::test::xpath::get_form_values proc

update message catalog

Provide a message key for help text, localize in German

Drop the pointsize parameter, use size instead, yielding more predictable results across Imagemagik versions and more controllable in general, make the wavelength randomized in the distortion

Port downstream change: adding label for question selection box

Many thanks to Felix Mödritscher

Normalize ordering in the catalog files to facilitate downstream merges

include timing information in DEBUG lines only, when nsf was configured properly with it

avoid unneccesary warnings (and unneccessary work)

In case the exam-protocol is shown filtered (e.g. only selected questions)

there is distinction between the available answer attributes and the

answer attributes, which is shown. Earlier versions tried to lookup

all available answer attributes, now we restrict the lookup to only

the shown answer attributes, and therefore avaiding running into

warnings of the form "No form field with name ... found"

Deprecate template::util::tcl_to_sql_list, completely replaced by ns_dbquotelist, a native NaviServer command

  1. … 3 more files in changeset.
Improve test portability

Baseline test of captcha robustness: challenge the captcha using tesseract, also applying basic normalizations

Fail when no value is specified

Fix tests according to new behavior

Improve behavior: invalidate the captcha when the check fails, cleanup expired captcha also when a new one is generated

Test newly introduced api

file captcha-procs.tcl was initially added on branch oacs-5-10.

A simple image captcha implementation:

a random text is converted to a distorted image, its checksum, together with the expected text are stored in a lookup table. Upon validation, the text input by the user is matched against the checksum to determine if the captcha is correct.

Plan is to use it downstream on certain publicly available contact forms.

file captcha-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    /openacs-4/packages/acs-templating/tcl/captcha-procs.tcl