• last updated 16 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Removed unused sql statements, removed inline sql to rely on xql one, small refactor to better use the api instead of direct sql.

    • -57
    • +0
    ./tcl/apm-file-procs-postgresql.xql
- bump version number to 5.9.1d14

- add ::template::csrf::validate to be used in page contracts. In difference to security::csrf::validate, this version checks, if csrf is enabled/disabled for this package

- improve documentation

Get rid of unneeded variable "start_time_fine" and return long db warnings with fractions of a second

Prettify code

Revive installing by apm file from the UI

  1. … 1 more file in changeset.
Fix apm tarball file generation (many thanks to Michael Feurstein for report)

- improve proc documentation

- Make security::locations aware of potentially multiple drivers listening on multiple ports

- use "ns_driver info" when available

Use namespace qualifiers instead of the Tcl "global" command

Fix typo, simplify and clarify content-type header manipulation

Don't add extra content-type when users specifies their own

Fix missing square bracket

Don't mess with user-defined content-type, unless required

Spool POST payload bigger than a threshold (default ~25MB) to a file, instead of keeping in memory the entire request.

This exploits (transparently) -body_file option in the ns_http API and native curl features.

Put some caching into utilities around to reduce db calls and execs.

    • -357
    • +583
    ./tcl/http-client-procs.tcl
- improve comments

Creation of this header is already done properly into ns_http

Insert content-length only when transfer-encoding is not chunked

- Aligned and fixed behavior for encoding of request with respect to redirect in the two implementations

- Use only binary encoding in curl implementation for the file used to spool the body, to avoid

corruption of content (eventual encoding has already happened in its proper place)

- Allow only for curl to exploit native file POSTing capability (only way to POST files > 2GB)

TODO: wrap this behavior in the generic API

- Add content-length header when POSTing content, as some servers will require it (curl did this already)

Don't put empty site node folders into the breadcrumbs (that is, site nodes not having a package underneath)

Move requirement of packages into proc.

Fix typo, allow to resuse tDOM object built when fixing markup instead of parsing again

- new utility to try 'fixing' invalid HTML

- fixed recognition of protocol agnostic urls

- use location from connection context and configurations to determine whether full urls are local

- optionally use new utility when plain parsing fails to try accepting a broader kind of invalid markup

- some update in test cases

- rename of the utilities with the 'dom' prefix, to make clear that this is the dom approach for sanitizing markup.

As it is sometimes prone to format and content loss, its use should be carefully considered.

    • -41
    • +140
    ./tcl/test/text-html-procs.tcl
- move test cases from utility procs into regression test

Improved behavior on links by using RFC compliant URL recognition.

Created (working) test cases

file text-html-procs.tcl was initially added on branch oacs-5-9.

    • -0
    • +0
    ./tcl/test/text-html-procs.tcl
Fix typo

New utility to sanitize HTML allowing to specify different sets of tags,

attributes and protocols to allow and two generic policies: strip javascript

and remove external references. It can also be used only for validation.

Removed leftover statement