• last updated 19 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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

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_"

...

}

cleanup: the updated version of the site-note code is appartently stable enough also for bootstrap situations

remove commented out coude

Provide better debug info in case "ns_parseurl" fails inside util::split_location

Factor our private function "util::ns_set_pretty_print" which might be

used also on other occasions.

rework of ad_decode

- modernize code

- improve performance

- extend regression test

Revert additional fallbacks, one should take care that ad_conn is invoked correctly

Provide further fallbacks for ad_conn

check that provided signature is a list, otherwise lassign will fail afterwards

Comment out test on WIP feature

fix for initial (boostrap) installation

slightly better way to handle testing in vanilla instances

Test exposing a suboptimal behavior: when we try to resolve the query via db_qd_get_fullname inside of OO code, a warning is generated

file acs-db-00-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    ./tcl/test/acs-db-00-procs.tcl
reduce dependency on xo namespace in acs-core

redice verbosity

Fix quote_unquote_html test

Support specification of allowed tags/attributes/protocols via global package parameters.

This change makes it possible to define for a package values for

AllowedTags, AllowedAttributes, or AllowedProtocols. If (some of)

these exist, use these for configuring "ad_html_security_check". If +

not, fall back to the default (site wide) definition.

This change is fully backward compatible and effects on sites defining

such global parameters. This change was induced by the need of large

sites, where it is not feasible to set these parameters on the package

instance level, since this site has 830000 packages instances.

Bump version number to 5.10.1d19

  1. … 2 more files in changeset.
Make ad_html_security_check configurable

ad_html_security_check has now three optional attributes

to make it configurable for different situations

-allowed_tags

-allowed_attributes

-allowed_protocols

If these attributes are not specified, the behavior is exactly like

before. This change makes it also easier to regression test this

function, since the behavior does not necessarily depend on a site's

parameter settings.

The function was also modernized, new regression tests were added.

    • -20
    • +39
    ./tcl/test/html-conversion-procs.tcl
make sure, the dependencies are aligned (drop of xo::site_node)

  1. … 1 more file in changeset.
Improve spelling

Fine-tuning the new db function interface

#

# Check, wether we have to regenerate the database function interface.

#

# - During initial setup, there are no db-functions, so nothing has to

# be done.

#

# - During regular startup of the server, the generation of the stub

# interface happens in the *init procs (hopefully this is always

# sufficient, but seems so)

#

# - During reloads of acs-db-*-procs, the base classes are interface

# objects are recreated and cleaned up from all prior definitons,

# which means that in this situations, we have to regeneate the

# interface.

#

# - One might call manually the regeneration, when database functions

# have been altered and no restart is desired.

#

Reform of site-nodes-procs

- made XOTcl2 based implementation of site-nodes usable during

initial bootstrap

- made new site-node cache implementation working for Oracle

- now, the same code works during bootstrap, for PostgreSQL and Oracle

and independent of xotcl-core being installed or not.

- removed old and broken nsv-based site-node cache

- reduced need of .xql files (removed query for delete.delete_site_node)

- moved deprecated calls to deprecated-procs.tcl

This change make the code much clearer and eases maintenance and debugging.

    • -327
    • +499
    ./tcl/deprecated-procs.tcl
    • -1587
    • +777
    ./tcl/site-nodes-procs.tcl
Update of SQL function calling interface to make it usable during initial bootstrap

- add sanity checks and produce error messages,

when function args are incorrect.

- do not throw errors in case it is called before the

table acs_function_args was created (during boot)

- added preliminary "list" call to acs::dc

- added first *-init.tcl to be called after loading

the *-proc.tcl files.

- removed all references to the ::xo::* namespace

file 00-acs-tcl-init.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    ./tcl/00-acs-tcl-init.tcl
Make parameter::get_from_package_key usable during inital boot

This change makes parameter::get_from_package_key usable during

initial boot, i.e. before the table apm_parameters is created.

In these cases, the function returns just the default value.