Index: openacs-4/packages/richtext-ckeditor4/lib/file-browser.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/richtext-ckeditor4/lib/file-browser.tcl,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/richtext-ckeditor4/lib/file-browser.tcl 19 Aug 2017 13:22:34 -0000 1.1 +++ openacs-4/packages/richtext-ckeditor4/lib/file-browser.tcl 15 Mar 2022 15:00:33 -0000 1.1.2.1 @@ -1,6 +1,6 @@ ad_include_contract { } { - {object_id:naturalnum} + {object_id:object_id} {type:word} {CKEditorFuncNum ""} {CKEditor:word ""} Index: openacs-4/packages/richtext-ckeditor4/tcl/ckfinder-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/richtext-ckeditor4/tcl/ckfinder-init.tcl,v diff -u -r1.5.2.2 -r1.5.2.3 --- openacs-4/packages/richtext-ckeditor4/tcl/ckfinder-init.tcl 18 Jun 2019 16:41:52 -0000 1.5.2.2 +++ openacs-4/packages/richtext-ckeditor4/tcl/ckfinder-init.tcl 15 Mar 2022 15:00:33 -0000 1.5.2.3 @@ -185,26 +185,34 @@ # File-browser (for the standard "filebrowser" plugin) # set complaints [::richtext::ckeditor4::ckfinder::query_page_contract { - {object_id:naturalnum} + {object_id:object_id} {type:word} {CKEditorFuncNum ""} {CKEditor:word ""} {langCode en} }] - permission::require_permission \ - -party_id [ad_conn user_id] \ - -object_id $object_id \ - -privilege read + if {[llength $complaints] == 0} { + permission::require_permission \ + -party_id [ad_conn user_id] \ + -object_id $object_id \ + -privilege read - set reply [template::adp_include \ - /packages/richtext-ckeditor4/lib/file-browser [subst { - object_id "$object_id" - type "$type" - CKEditorFuncNum "$CKEditorFuncNum" - CKEditor "$CKEditor" - langCode "$langCode" - }]] + set reply [template::adp_include \ + /packages/richtext-ckeditor4/lib/file-browser [subst { + object_id "$object_id" + type "$type" + CKEditorFuncNum "$CKEditorFuncNum" + CKEditor "$CKEditor" + langCode "$langCode" + }]] + } else { + # + # Page contract failed + # + dict set d errMsg "invalid query parameter // $complaints" + set reply [subst {[dict get $d errMsg]}] + } ns_return 200 text/html $reply }