• last updated 16 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add must_exist flag to enforce a safe tmpfile to already exist

    • -2
    • +2
    /openacs-4/packages/acs-tcl/acs-tcl.info
Fixed bug in util_convert_line_breaks_to_html

The code deleted spaces around certain tags, while - according to the

documentation, only line breaks should be removed from there.

Extended regression test.

Improve doc

Revert to previous template::widget::file behavior of accepting input in a form of a list of 3 elements (e.g. without a .tmpfile in the request), but introduce validation so that we enforce all widget values to be in the proper format and the files to be "safe"

file file-procs.tcl was initially added on branch oacs-5-10.

Bring test closer to reality

Introduce security::safe_tmpfile_p checking whether a file belongs to the configured tmpfolder and respects other constraints

The plan is to use it to improve input validations

    • -2
    • +2
    /openacs-4/packages/acs-tcl/acs-tcl.info
Fixed serious bug killing at least short-text questions in inclass exam

The bug was introduced in [1], by testing for the existence of the

disabled attribute, and when it exists, it was omitting values

reading. The problem is that when form-fields are reset, the

"disabled" attribute is set to 0, leading the exists check to

succeed. In essence, This change sets now the default value of the

form-field to "0", such that it is safe to test it everywhere.

Originally, it was not set by default to save resources (memory and

processing power), but this requires a more careful analysis when

changes happen.

[1] https://fisheye.openacs.org/browse/OpenACS/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl?r1=1.368.2.125&r2=1.368.2.126

Tighten test for is_wf_instance

Previously, the test was based on setting of state and FormPage.

In cases, where plain FormPages are used inside an xowf package

this test was leading to wrong results.

    • -1
    • +4
    /openacs-4/packages/xowf/tcl/xowf-procs.tcl
base all timings on NavigationTiming plugin to get closer to previous behavior

file navtiming.js was initially added on branch oacs-5-10.

improved error message

make clear, what the name and what the item_id in the message are

    • -2
    • +2
    /openacs-4/packages/xowiki/tcl/folder-procs.tcl
use new path xowiki/lib/portlets/ instead of .../www/...

    • -3
    • +4
    /openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
comment method

Deactivated script-dynamic again

activating "script-dynamic" for script-src prevents resources as the following from loading

<script type="text/javascript" src="/resources/xowiki/bootstrap-treeview/1.2.0/bootstrap-treeview.min.js" nonce="F8843D5CD542FB1CDB4C94C5D13C4E5ECC2E1DCA">

improve test coverage of apm_* API

reduce verbosity

added test for checking documentation in regard of valid HTML markup

Test the behavior of the file-storage when a malicious user would try to store a pre-existing file on the server as its own

The fix for the file-storage is a simple validation to make sure that the tmpfile exists, however, for the generic case of the file widget, we cannot trust the tmpfile value when this was not generated by the server. This will probably cause regression when one wants to show a "preview" of a form, to be continued.

Whitespace cleanup

replace occurrences of <br/> in api doc strings

Properly escape "<" and ">" in api-doc documentation.

Since all documentation is rendered via HTML, the characters

"<" and ">" have to be HTML-quoted, otherwise strange things

(omission, unintended renderings) might occur.

E.g. the sentence

Define an interface between a page and an

ADP <include> similar to the page_contract.

was rendered as

Define an interface between a page and an

ADP similar to the page_contract.

which is incorrect.

Incorporate feedback from downstream penetration tests:

do not skip basic validation in the file widget when a tmpfile is not found in the request.

forum_id is actually optional here

Port of downstream hotfix: questions defined with an empty scoring might later fail the score calculations

One might consider preventing empty scores altogether via validation

improving rendering in api-doc

- fixed validity of HTML (missing <dd>)

- use

<dt>foo</dt><dd>...</dd>

instead of

<dt><b>foo></b><dd>...</dd>

and other variants. This improves stylability.

Moved styling to site-master.css

properly quote tags when meant literally

Extend test depending on the setting of EmailForgottenPasswordP

Changed "db_multirow" to use "db_list_of_lists" instead of "db_list_of_ns_sets"

Thanks to the recent improvements in NaviServer for

"db_list_of_lists", it is more efficient to use this in "db_multirow"

(actually in "db_multirow_helper"). The implementation revealed a bug

in "db_list_of_lists", when both options "-columns_var" and

"-with_headers" were set.

Extended regression test to cover the former bug.