Dashboard

Merge branch 'main' of git.ai.wu.ac.at:tcltk/nsf

Add to hosts files on macOS runners

Add to hosts files on macOS runners. Fixes actions/runner-images#9346

Flush the whole key pattern, now that the key can end either in true or false

Fixes locale__test_lang_conn_browser_locale automated test

Manually replace the ":" entity to prevent attempts at disguising "javascript:" links

Replicate injection attempt by penetration tools

Fixed unreviewed commit, which might lead to hard-to-spot errors

The last change assumed that "nls_language" can be hard-wired to

contain most 5 characters. While this not backed by the OpenACS data

model, the standard (RFC 5646) explicitly states that there is no

upper limit on the size of language tags. The tree letter language

codes have been standard since 2001 (RFC 4646).

The change accepts now all defined locales. When the specified locale

is not enabled, it provides a log notice, when the locale is not

defined at all, it provides a warning and falls back to "en_US".

    • -10
    • +19
    /openacs-4/packages/acs-lang/tcl/locale-procs.tcl
    • -3
    • +3
    /openacs-4/packages/xowiki/xowiki.info
page filters with NUL value

Prefer "string first" over "regexp" since this is twice as fast.

Fixed implementation of value checker dbtext

The old version was not persistent in the blueprints.

Furthermore, the new version is more than 2x faster by

avoiding regular expressions.

bootstrap5 theme: prettify appearance for "ad_form -mode display"

The previous change was already a big improvement. The change makes

it easier to distinguish the field labels from the field content.

security::validated_host_header: Made acceptance of configured vhosts the first check

Under certain conditions (such as running in a container, or reverse

proxy situations) the admin of a server wants to specify accepted host

names. This can be achieved in the "*/servers" section of a network

driver. These values are used now first for accepting host header

fields. This change avoids unexpected redirects to, e.g., internal

server addresses.

bugfix: fixed test test_ad_register_proc when running in a container

When runnig in a container, one cannot use util_current_localtion, which refers

to the URL to reach the server from the container host. To address the server

inside the container, acs::test::url should be used.

This change does not matter for non-containerized applications

Provide facilities to validate against invalid SQL strings

We introduce a new page contract filter and nsf validator called "dbtext". They implement enforcing of a value to be useable in an SQL query. Currently, this means that the value should not contain the NUL character, but the definition may change in the future or become database-specific.

The html contract filter has also be extended to reject the NUL character.

The test suite has been updated/extended to reflect the changes.

Fix var substitution

GitLab runner: Provide for curl

Update .gitlab-ci.yml file

Initial .gitlab-ci.yml file to integrate with fisheye.openacs.org

Separate form widgets from label and help-text vertically by wrapping them in a div, render form labels in a larger font for better visibility

Whitespace changes

Harden page contracts

Validate as a token also the default coming from _nls_language, ensure the resulting language key is at most 5 chars long (many thanks to Markus Moser for this)

Update external dependencies to use the URN version

Provide a more meaningful error message

Use loopback IPv4 address, to work around the DN service being unavailable on GH macos runners

Merge ahead commits from fork gustafn/nsf

Reform of error handling in ad_page_contract when template recursion is detected

A "complaint recursion" happens if a validation error takes place in one of the templates used while rendering the error page (for instance, anything we include in the master template or the master template itself).

Previously, we would give up complaining after 10 recursions were detected. This had the consequence that after 10 attempt, the failing template involved in rendering the complaint would be fed the invalid data we were trying to reject.

Now, we complain and stop the execution as soon as a recursion is detected. The error will be rendered in a very basic way that overrides the templating system, so that we can exit the recursion cycle.

In practice, only malicious page manipulation attempts should be affected by this change.

improved portability: some versions of "gzip" do not support option "-S"

improved spelling

Fix date validation using new contract features

improved spelling