On Thu, Jan 28, 2016 at 2:21 AM, Ross Berteig <r...@cheshireeng.com> wrote:

> In my test case, I use /json/wiki/create and /json/wiki/save to create and
> update a page named "Page2". I then inspect the change I made with
> /json/wiki/diff/uuid1/uuid2 the UUIDs match the parent and uuid fields
> returned from /json/wiki/get/Page2. That should show the addition of a
> single line to the content. What I get back in the content field of the
> payload is:
>

Related:

https://www.fossil-scm.org/index.html/info/9b8b051899ca59b4

Hmmm. The test code:

# json cap
# Bug? The CLI user has all rights, and no auth token affects that.
write_file u2 [subst {
  {"command":"cap",
   "authToken":"[dict get $AuthAnon]"
  }
}]
fossil_json --json-input u2

i would have thought that that would do, but apparently it doesn't. i find
the following comment (probably written by a much younger me) in
json.c:json_auth_token():

      /* Reminder: chicken/egg scenario regarding db access in CLI
         mode because login_cookie_name() needs the db. CLI
         mode does not use any authentication, so we don't need
         to support it here.
      */

That might be the root of the problem.

Unrelated:

i see in the test script that it adds an empty file, and that got me
curious... it seems we already have one:

[odroid@host:~/fossil/fossil/test]$ f sqlite "select * from blob where
uuid='da39a3ee5e6b4b0d3255bfef95601890afd80709'";
525|1|0|da39a3ee5e6b4b0d3255bfef95601890afd80709|
[odroid@host:~/fossil/fossil/test]$ f-query -e "select fsl_content(525)"
fsl_content(525)


Maybe that can save you an add/commit.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to