• last updated 5 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Port of downstream modification in place since at least 2012

When parsing XoWiki links, accept links in the form [[link|| -flag1 flagvalue]], where the label is set to empty.

    • -2
    • +2
    /openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
Port of downstream fix by Markus Moser on live since 2022-09-21

Fix regression after disabled formfield reform

Fix variable name after refactoring

fixed typo

Updated location handling

- make use of "ns_server hosts" when available

- refactored and simplified code

- keep validated locations in an nsv array

- added support for extra white-listed hosts

in case, every other configuration fails

(should not be necessary)

ns_section ns/server/$server/acs {

ns_param whitelistedHosts {...}

}

- updated inline documentation

The new code is supposed to handle in combination of a recent NaviServer

all complex host header validation scenarios, include running behind a proxy,

in a container or cluster.

Updated icanuse registry

- added "ns_ip", "ns_subnetmatch", and "ns_server hosts"

- sorted commands alphabetically

whitespace changes

    • -19
    • +19
    /openacs-4/packages/acs-tcl/tcl/html-procs.tcl
modernize code

moved long time deprecated function "ad_approval_system_inuse_p" to deprecated-procs

    • -18
    • +1
    /openacs-4/packages/acs-tcl/tcl/admin-procs.tcl
Improved comments and make code more robust in regards of legacy setups

Added support for relative redirects

RFC 2616 requires an absolute URI in the "Location" header field. So

if someone calls "ns_returnredirect /", NaviServer transforms it on

the fly into an absolute URL by prefixing it with the location

(e.g. https://openacs.org/). NaviServer (and OpenACS) has some complex

code to compute the location value, especially when virtual servers

are involved (or for "host-node mapped" subsites in OpenACS). The

situation is further complicated when running behind a reverse proxy

and/or in a containerized environment. In such cases, the location is

computed from the "host" request header field, which must be

validated, otherwise an attacker could hijack a session and redirect

it to a spoofed site.

The situation changed 10 years ago (June 2014) with the introduction

of RFC 7231, which allows relative redirects (see

https://www.rfc-editor.org/rfc/rfc7231#section-7.1.2). Using relative

redirects greatly simplifies configuration and closes the attack

vector using the host header field. RFC 7231 has been superseded by

RFC 9110 (June 2022), which also supports relative redirects via the

"location" response header field (see

https://www.rfc-editor.org/rfc/rfc9110#field.location).

Since OpenACS prefixed always the URL with a location, when it

encounters are relative URL in a "ad_returnredirect", this change

makes use of the new feature of NaviServer 5.

Make sure to use a current version of NaviServer, where the support

was added recently.

Document more explicitly that we do not perform filesystem operations when deleting files via the fs:: api, but we rely on the content repository and its trigger+scheduled proc mechanism

Document behavior: the assumption that one can derive the filename from the api is not correct in case of copies

Revert https://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-10%3Aantoniop%3A20240423144330

currently, file-storage will copy files by simply copying the revision entry of the new file from the original one. This means that copied files will in fact point to the same filesystem file of the original.

This "works" because the file-storage api will currently never delete a file from the filesystem, so deleting the original file will not affect the copies.

This behavior is probably not ideal, but we won't address it before the release, as to change it will most likely require some careful planning, in particular for existing installations.

improved robustness during bootstrap

improved speling

improved spelling

updated jqueryui to latest version

improved spelling

bumped version numbers due to upstream releases

Extended "ad_conn behind_secure_proxy_p"

This test will be now true, when either the recieved request

contains one of those request header fields.

- "X-SSL-Request: 1"

- "X-Forwarded-Proto: https"

Before, only the first variant was accepted.

The AWS load balancer uses the second variant.

whitespace changes

Fixed potential infinie loop when source code looks like an regexp call

The api-code prettifier contains several heuristics for prettifying

source code without being a proper parser. It contains a

"Hack for nasty regexp stuff" which could run potentially into an infinite

parsing loop. This change fixes an acutal bug on openacs.org for file [1]

which is site-local.

[1] https://openacs.org/api-doc/procs-file-view?path=packages/xowf/tcl/openacs-procs.tcl&version_id=5526548&source_p=1

fix typo

Permit "lang::message::cache" in acs::clusterwide operations

improvement for ACS clusters

Incorporated changes as suggested by Jonathan Kelley

For details, see https://openacs.org/forums/message-post?parent_id=5814308

Base "ad_conn behind_proxy_p" on "ns_conn details" when available

Inject a reference to the current connection package into the tinymce conf (when used outside of xowiki)

Fix file metadata

Provide a reference to the current object when configuring tinymce