• last updated 22 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Extend test suite to check URL protocol validation

Complete the URL earlier, so that protocol-relative URLs can be correctly determined as external or not

Extend test suite to check behavior validating external URLs

Fixes for regression test: util_http_json_encoding

This change corrects 2 bugs, causing the regression test to fail under certain circumstances:

1) use for test location [::acs::test::url] instead of [ad_url]

The call [::acs::test::url] should be used for all tests in the regression tests and avoids

problems with wrong URLs when running e.g. in a container

2) When running on a setup with self-signed certificates, the curl requests require a "-k"

flag to be passed. Otherwise, the regression test fails.

Rework URL validation in ad_dom_sanitize_html

We now prefer higher level api to determine:

- if a URL is external

- what protocol should be assumed for a URL when this is relative or protocol-relative

Fix test case

Extend test suite

Don't append a dot to the confirmation_url to avoid 'dead URL'-problems in e-mail clients. Put the URL in quotes.

Don't append a dot to the confirmation_url to avoid 'dead URL'-problems in e-mail clients.

provide a better domain name for temporal accounts in regression test

fixed regression test, when mailserver is not yet set up (nssmtpd only)

made test for valid protocols case invariant

Reflect api changes in the test suite

improved spelling consistency

    • -2
    • +2
    /openacs-4/packages/forums/tcl/forums-procs.tcl
improved spelling

adapt to latest cluster management changes in acs-tcl

improved Tcl9 compatibility

improved typesetting in email to admin to increase readability

improved spelling

Cluster updates: better support when running in containers

- generalized servers running with an INADDR_ANY address

- handling of running server with ephemeral ports

- streamline function and variable names

- added ./tcl/acs-container-procs.tcl

* make container definitions independent of cluster handling

* create container mapping based on a JSON file, which

can be obtained from docker to get information about

external addresses

* The final interface is a mapping file in Tcl providing at least

the Tcl dict ::docker::containerMapping containing the docker

mapping. A dict key like "8080/tcp" (internal port) will return a

dict containing the keys "host", "port" and "proto" (e.g. proto

https host 192.168.1.192 port 58115).

    • -61
    • +202
    /openacs-4/packages/acs-tcl/tcl/cluster-procs.tcl
file acs-container-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    /openacs-4/packages/acs-tcl/tcl/acs-container-procs.tcl
In the end we do phase out the util_expand_entities* procs for being too lame

Good riddance

a protocol relative URL is not complete, but it can be understood as external

Make util_complete_url_p recognize protocl-relative URLs

Extend the test cases for util_complete_url_p with a case of protocol-relative URL

Reimplement util_expand_entities_ie_style

This proc turned out to be long broken. We could consider phasing it out, but as it is a public interface used in a few places we prefer to keep it around and try to fix it.

The intended behavior has been reconstructed from the documentation. The new approach uses a single regexp to extract entities, which does not risk to loop indefinitely as before.

Test util_expand_entities and util_expand_entities_ie_style

This test will show that since the long broken parenthesys in util_expand_entities_ie_style were fixed in a recent commit, this proc will just not work.

Fix typo

After further consideration, ns_absoluteurl is actually sufficient to preform location header completion on its own and does not need a wrapper utility

Streamline terminology with other occurrences in OpenACS and NaviServer/AOLserver

- the term "location" is usually used in OpenACS/NaviServer/AOLserver for the

part of a URL before the path (i.e. SCHEME+HOST+PORT)

- the new function util::absolute_url is a value-added version of NaviServer's "ns_absoluteurl".

This is now documented with its differences, and aligned with its terminology