• last updated 22 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- Fix a tricky Tcl_Obj sharing bug triggered by the usage of C-level

IndexObjs based on volatile tables. Consider the following example:

proc foo {x} {

return [bar -value x ...]

}

The Tcl_Obj "x" is shared as name of argument and as a value of the

non-positional parameter "-value". When bar (e.g. C-implemented)

uses Tcl_GetIndexFromObj*() to lookup "x" in a table of options,

which is volatile, the involved Tcl_Obj will be converted to an

indexObj.

On a call with wrong number of arguments( e.g."foo 1 2 3"), Tcl

will try to give a nice error message, saying that "foo x" can be

called only with one argument. When printing argument "x", it sees

that "x" is an indexObj, and for these kinds of objects, "x" might

be an abbreviated version of a full name. Since the table behind

the indexObj is in the case above volatile, a crash might happen.

The committed fix above is just a temporary measure. NaviServer should

try to avoid such Tcl_Obj conversions in these cases. It is also

questionable, whether the attempt to interpret a argument name as

an abbreviated.

Whitespace cleanup

    • -14
    • +13
    ./tcl/utilities-procs-naviserver.tcl
New test for json and utf-8 encoding against Postman Echo webservice (https://docs.postman-echo.com)

Switch order of "ns_return 500" and "ad_log error" to see the error message also in cases, where "ns_return 500" will fail due to a already closed connection,

(Many thanks to Franz Penz for the suggestion)

new API call "http_auth::basic_authentication_decode" to replace 3 distinct implementations of this logic

  1. … 5 more files in changeset.
align implementation with code

Fix broken test case (broken in many dimensions)

    • -5
    • +17
    ./tcl/test/naviserver-api-procs.tcl
modernize Tcl

  1. … 1 more file in changeset.
remove uneeded flag

Revert cache flushing, as it was solved differently downstream

Force a complete flush also when setting a global parameter, other than when deleting

This operation seems superfluous upstream, but downstream code has some specific flushing behavior that would otherwise be applied only at deletion. The change is supposed to be merged in a way that will enable such specific flushing downstream

new funcion: util::inline_svg_from_dot: refactored version from private api-procs function.

use new function in api-doc

CVS: ----------------------------------------------------------------------

  1. … 2 more files in changeset.
prefer curly braces for list of options

provide a better name for link in test case

ad_schedule_proc: change default of optional parameter "-thread" to "t" to reduce likelyhood that

main sched thread is blocked to long. While the main sched thread is blocked, no other jobs

will be scheduled. This can lead to potential problems, when scheduled procs should be executed

at certain times.

Whitespace changes

  1. … 2 more files in changeset.
Use 'ns_log Error' for error logging, instead of 'ns_log Notice: Error...'

  1. … 4 more files in changeset.
Remove the acs-tcl testcase 'documentation__check_proc_testcase', as it provides information already covered by the new 'acs-automated-testing/www/admin/proc-coverage' page and the '::aa::coverage::*' procs

Reimplement portrait retrieval around the user_portrait relationship, as procs such as merge::MergeUserInfo do not assume a certain name format on the cr_item

Avoid potential quoting issues by enclosing body in a list statement (many thanks to Nathan Coulter)

Fix copy paste

Simple test to make sure available md5 decoding implementations work the same

    • -0
    • +27
    ./tcl/test/naviserver-api-procs.tcl
file naviserver-api-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    ./tcl/test/naviserver-api-procs.tcl
Reduce divergency between oracle and postgres

Remove unnecessary 'aa_run_with_teardown'

    • -21
    • +17
    ./tcl/test/acs-tcl-apm-procs.tcl
    • -20
    • +12
    ./tcl/test/acs-tcl-test-procs.tcl
  1. … 1 more file in changeset.
Add 'db_dml', 'db_0or1row' , 'db_abort_transaction' and 'db_multirow' to the list of covered procs of different testcases

Add 'ad_tmpdir' and 'ad_url' to the list of covered procs of different testcases

    • -1
    • +4
    ./tcl/test/application-data-link-procs.tcl
Add 'xml_doc_get_first_node', 'randomRange', 'whos_online::user_invisible_p' and 'site_node::get_url_from_object_id' to the list of covered procs of different testcases

Add 'db_string', 'db_list' and 'db_list_of_lists' to the list of covered procs of different testcases