• last updated 20 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
added icanuse rule for ns_parsehtml

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

  1. … 2 more files in changeset.
use "ns_strcoll" for ordered composite when available

  1. … 1 more file in changeset.
include timing information in DEBUG lines only, when nsf was configured properly with it

  1. … 1 more file in changeset.
use icanuse machinery for "ns_reflow_text -offset"

  1. … 1 more file in changeset.
Modernize parameter parsing (query and includelet paramters)

- handle invalid UTF-8 exception that might be triggered by

"ns_parsequery" in newer versions of NaviServer

- the new code is about 4 times faster than the old one

- replaced array by dict

- don't create helper procs on the fly but use "nsf::parseargs" if possible

- added icanuse rules for

* "nsf::parseargs -asdict"

* "ns_parsequery -charset"

  1. … 1 more file in changeset.
security::locations: return configured servers from the driver/servers section

additionally, improve caching

  1. … 1 more file in changeset.
added icanuse for "ns_pg pid"

provide as well a minimal compatibility for "-size" parameter on ns_baseunit

  1. … 1 more file in changeset.
added a partial backwards compatibility implementation of for ns_baseunit (as used in request processor)

  1. … 1 more file in changeset.
Use "ns_baseunit", when available for size calculation of parititoned caches

Generalize ::acs::try_cache (such it can be use not only for "...cache eval..."

  1. … 3 more files in changeset.
added support for "ns_trim -prefix".

The command is predefined in NaviServer; if not available, a comatibility version is added.

This change also mitigates a potential memory-leak problem in nsv_dict with certain

versions of NaviServer which might lead on busy sites to problems.

  1. … 3 more files in changeset.
Stronger password hashes for OpenACS

This change introduces the possibility to use either the classical

OpenACS password hash algorithm "salted-sha1" or the SCRAM passord

function "scram-sha-256". The latter can be used by (a) using the

most recent version of NaviServer (from Sept 28, 2021 or newer) and

(b) by configuring the password hash preferences via Kernel package

parameter "PasswordHashAlgorithm". The package parameter can contain a

list of multiple hash algorithms in preference order. The most

preferred available algorithm is chosen.

By default, the "PasswordHashAlgorithm" is "salted-sha1", and the

behavior is as before. After upgrading to the new version of acs-tcl

and acs-kernel, the preference list can be configured. When a user

logs in and the preferred available algorithm is different from the

previously used algorithm, the upgrade is performed for the user

automatically.

The usage of SHA1 in OpenACS is easily target of security audits (see

[1]). The biggest danger is that if somebody gets full access to the

"users" table (e.g. when decommissioning a hard disk). In this case

the hashes can be attacked with dictionaries by using some crypto

hardware (when someone gets raw access to the DB, one has usually some

other big problems). However, by using the "scram-sha-256" hash

function this danger is substantially reduced. This function computes

a password hash using PBKDF2 (Password-Based Key Derivation Function

2). This function is used to reduce vulnerabilities of brute-force

attacks against password hashes. The hash function of SCRAM is PBKDF2

[RFC2898] with HMAC as the pseudorandom function (PRF) and with dkLen

== output length of HMAC == output length of the digest function. So,

it uses a better hash algorithm (sha-256 vs. sha1) and applies this a

high number of times (15K times for a password hash computation).

NaviServer supports as well the even better SCRYPT algorithm, but this

is only available when NaviServer is compiled with OpenSSL 3.0 or

newer. On the contrary, scram-sha-256 (actually PKCS5_PBKDF2_HMAC) is

available since OpenSSL 1.0.0 (2015).

All the improved hash functions require NaviServer with its tight

integration to the crypto functions of OpenSSL.

[1] https://openacs.org/forums/message-view?message_id=5522562

  1. … 6 more files in changeset.
provide a compatibility function for ns_parsehostport for earlier versions of NaviServer

added "ns_parseurl -strict" to icanuse definitions

improved spelling

  1. … 5 more files in changeset.
remove dependency of general-comments on acs-mail-lite

  1. … 3 more files in changeset.
make use of built-in reverse proxy mode of newer versions of NaviServer

  1. … 1 more file in changeset.
Revert to previous strategy of determining available subcommands.

Running the provided subcommand is dangerous, since the command might

have side effects, might require connections, etc.

The feature test for "ns_http run" was incorrect, since it was not

introduced with 4.99.15 (as the comment suggested), but already with

4.99.4 (2017)... but at this time, the command did not return a dict,

which is assumed in the http-client procs. One can use "ns_http stats"

as an indicator for this feature, which was introduced at the time

when "ns_http run" was starting to return dicts as results.

Provide a more precise name for the feature test of ns_http returning

dicts (naming the feature simply "ns_http" is not a good idea, since

the command could of course be used already before the feature change).

  1. … 2 more files in changeset.
Do not improperly rely on apm_version_names_compare to check for NaviServer version number, use a more reliable capability check instead

  1. … 1 more file in changeset.
Change the regexp so that we catch multiple kinds of error pattern indicating the subcommand does not exist: NaviServer and Tcl return sligthly different error messages

Use a different idiom to detect if a command supports a subcommand, fixing acs-tcl.acs__command_has_subcommand automated test

Bring existing doc in the api-doc, so that documentation__check_proc_doc test case does not complain

added backward compatibility proc for AOLserver "ns_trim"

  1. … 1 more file in changeset.
add i-can-use rule for "ns_urlencode -part oauth1"

Prefer 'namespace which' over 'info commands', as it is faster (on local tests, around 2x) and returns a single value. Many thanks to Nathan Coulter.

  1. … 58 more files in changeset.
added "ad_conn bot_p" to check, whether request was initiated by a bot

This feature is based on a simple heuristic based on the user-agent

(which can be certainly extended). It is useful to avoid e.g. Google

bot to run into "notifications subscribe" + login attempts, which

are useful for not-logged-in user, but not for bots. These attemps

lead to failures in google statistics that might reduce the google

ranking of a web site.

  1. … 2 more files in changeset.
use common "icanuse" idioms

  1. … 1 more file in changeset.
improve spelling

  1. … 6 more files in changeset.
provide a hint to make potential upgrade problems more clear