• last updated 8 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
ad_page/include_contract argspec parsing reform: allow arbitrary characters in the argspec flag parameters

This reform allows to specify an argspec containing pipes, parenthesys and other so far forbidden characters as parameters for a flag. The purpose is to enhance the expressiveness of existing validators (e.g. the oneof validator) and enable new one, for instance, a date validator using a clock format as parameter.

Pipes and parenthesys need to be escaped via the backslash character in the new syntax.

    • -0
    • +112
    ./test/tcl-documentation-procs.tcl
file tcl-documentation-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    ./test/tcl-documentation-procs.tcl
provide compatibility with tdom 0.9.3

Add @see to deprecated procs

Add @see to deprecated procs

Add @see to deprecated procs

Add @see to deprecated procs

Deprecate ad_apply, made obsolete in modern Tcl by the expansion operator "{*}"

  1. … 4 more files in changeset.
Handle upcoming tDOM 0.9.3

This might need some further rethinking

provided a default value for udp:// requests

added ADP:ICON to the list of accepted tags (for new instances)

  1. … 1 more file in changeset.
Make api public

security::cookie_name: since this is used in acs-lang, it has to be public

Added dynamic cluster configuration checking

- handle cases, where not all cluster nodes are available at startup

time (this is a problem for docker, since the IP addresses will not

be available as well)

- handle dynamic changing of configuration variables

- refactored code

- new methods "acs::Cluster register_nodes" and

"acs::Cluster refresh_blueprint" (called regulary via scheduled

procedure, running every minute)

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

Support the usage of HTTP locations in kernel parameter ClusterPeerIP

The change extends the values specified in ClusterPeerIP in two respects

- one can now specify the protocol (defaults to http)

- while ClusterPeerIP required an IP address, it is now possible to specify an DNS name

The DNS name is resolved for the time being at the start time of the OpenACS instance.

flipping of session_id apparently works without keeping track of the old session_id, so there is no need of keeping track of it

improved comments

Small optimization for cachingmode "none": no need to broadcast cache flushing

fix missing colon (many thanks to Marty Israelsen for reporting)

Use NaviServer feature "ns_deletecookie ... -samesite $samesite ..." when available.

fix brackets

added argument handling to try_cache operations

removed unused query (many thanks to Franz Penz for noting)

reduce verbosity

whitespace cleanup

added sni hostname and redirect on 301 and 302

new API call ::security::csp::add_static_resource_header

The API call set the CSP rule on the current connection for a static

resource depending on the MIME type.

# Sample definition for custom CSP rules for static files in the

# OpenACS configuration file.

#

# ns_section ns/server/$server/acs {

# ...

# ns_param StaticCSP {

# image/svg+xml "script-src 'none'"

# }

# ...

# }

bump version number of acs-tcl to 5.10.1d13

  1. … 1 more file in changeset.
Added new private helper proc ::util::resources::download_helper

to deal with redirects on github, when "util::http::get" is used.

New feature: cookie namespaces

So far, all OpenACS versions used "ad_" as a prefix for cookies (such

as ad_login, ad_session_id, ...). In certain situations this can lead

to confusion, since cookies are managed by browsers via domain names,

and running multiple OpenACS instances in the same domain will cause

overwriting of such cookies by these instances. The can happen e.g.

when running multiple instances on the same machine, or using

port-forwarding to virtual machines/containers, using reverse proxies,

etc. Note that the cookie overwriting problem does not exist for

host-node-mapped subsites, since host-node-mapping depends on domain

names.

One could consider using the port in the cookie name (as

sometimes noted as an option), but this would not work, in case the

same server should be reachable over multiple ports.

Therefore, one can now specify a "CookieNamespace" in the OpenACS

configuration file, which is per default "ad_", which is sufficient

for the majority of installations. In cases, where it is needed, a

different CookieNamespace can now be configured.

To manage the cookie names internally, OpenACS provides a new API call

security::cookie_name to derive the namespaced cookie name from a stem.

Snippet of the OpenACS configuration file for setting the CookieNamespace

#---------------------------------------------------------------------

# OpenACS specific settings (per server)

#---------------------------------------------------------------------

ns_section ns/server/${server}/acs {

ns_param CookieNamespace "ad_"

...

}