• last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
improve german message keys (spelling, comma, spaces, orthogonality)

    • -10
    • +10
    ./catalog/acs-tcl.de_DE.ISO-8859-1.xml
  1. … 3 more files in changeset.
reduce further redundancy

reduce frequent small SQL queries and streamline code

Make so that upon package deletion, also the leftover site nodes are deleted (if they do no have children nodes)

  1. … 1 more file in changeset.
Don't complain when flushing per-thread cache without content

Added per-request-cache for parameter::get similar to parameter handling in xotcl-core

This change improves scalability especially on sites with high numbers

of concurrent requests by reducing the number of required locks in

general. This change keeps the parameter dict in a per-request cache

to reduce potentially high number of nsv locks, when parameters of a

package are queried a often per request. Without this change we see on

some sites > 100 locks on the ad_param-nsv per request. Alone the

request-procesor queries a larger set of parameters from the acs-core

package, which requires now a single lock operation.

Using the per-request cache has the advantave of avoiding locks and

keeping the internal representations of tcl-objs (whereas ns_cache or

nsvs use plain strings).

mitigate attacks, where the referer header field is changed to a malicious value

The problem does not exist, when CSP is defined properly.

Many thanks to Frank Bergmann for sharing the pen-test protocol

Performance improvement: make "apm_version_names_compare" faster by a factor of ~100

The function "apm_version_names_compare" is called relatively often

and issues an SQL query. The function is stable (returns always the

same results for the same input) and called with only a few different

input values. By using acs::per_thread_cache the performance improves

from 265 microseconds to 2 microseconds; by using the per-tread cache

the operation scales better since it is fully lock-free (once cached).

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. … 2 more files in changeset.
remove incorrect and misleading comment and simplify code accordingly

set the global variable ::acs::kernel_id early enough during boostrap of new instances, such it can be used in a uniform way

  1. … 1 more file in changeset.
improve comment

extend tests for naturalnum

Prefer api to retrieve the acs-kernel id, as this will work also in corercases such as bootstraping of a new OpenACS instance

fix wrong name (not sure, why i have not noticed this earlier)

perform also sitewide flushes for urspace based site-node cache

More work on refactoring and streamlining cluster infrastructure

- removed more cases of ad-hoc parsing of IP address and port

- reduced code redundancy

- fixed incorrect comments

- removed obsolete private functions server_cluster_httpget_from_peers

and server_cluster_do_httpget (replaced by acs::clusterwide)

Refactored and streamlined of cluster infrastructure

- base the API new new cluster infrastructure (including memoize-flush, server_cluster_peer_hosts, etc.)

- improved handling for multiple IP addresses and IPv6

- removed assumptions of local vs. global network drivers

- server_cluster_httpget_from_peers not used anymore

  1. … 1 more file in changeset.
Provide a default timeout of 5m to all ns_cache besed caches created via the acs-cache infrastructure

Background: in case, a db entry is to be cached, where the db query

does not finish (e.g. runs into a deadlock), subsequent attempts for

the same value will be blocked as well by the mutex protecting the

entry to be cached. Therefore, later requests to this entry might queue

up in the server. By providing a timeout, this mutex will terminate

latest when the timeout is reached.

The default value for the timeout is set to 5m. In case a certain

cache might issue requests running longer than this, the cache has

to be configured with a larger timeout value.

improve spelling

provide a fork-free implementation of dot rendering

Improving ad_parameter_cache:

- added handling of cachingmode "none"

- added implementation via "nsv_dict" (cluster aware)

- execute parameter callbacks cluster-wide

- version number bumped to 5.10.1d4

improve spelling

added support for SCRYPT (RFC 7914) as password hash function.

The use of scrypt requires NaviServer compiled with OpenSSL 3.0 or newer

  1. … 1 more file in changeset.
stick to the original names with the "-" since this is also the naming convention outside of OpenACS (e.g. "scram-sha-256")

  1. … 5 more files in changeset.
Set ad_include_contract's local variables in a way that they are hinted as private by the "__" prefix: this reduces the chance of conflicting with popular variable names to pass to an include such as "context"

Change caching of driver keys

There seems to be a bug in "db_driverkey", when OpenACS connects to

multiple databases [1]. The situation with "db_driverkey" is

complicated by the fact that this function is sometimes called with a

database name in its argument "dbn", and sometimes with a database

handle. This is something to look at in the future.

The new version removes the per-thread caching, which was introduced

to reduce the high number of mutex locks caused in busy machines. The

new version is better by a factor of 2 than older versions, but relies

on NaviServer.

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

Complete reform introduced in https://cvs.openacs.org/changelog/OpenACS?cs=oacs-5-10%3Agustafn%3A20210928124647

- add datamodel change to the creation script

- refactor algorithm names in a way that the new procs will comply with acs-tcl.naming__proc_naming automated test

  1. … 5 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. … 3 more files in changeset.
Add missing argument expansion and comply with automated test