couchdb-futon.git
8 years agoRemove old jshint.js
Russell Branca [Tue, 19 Nov 2013 22:11:16 +0000 (14:11 -0800)] 
Remove old jshint.js

8 years agoCOUCHDB-1930 - fix - Futon, create New Document and change _id, clicking Save Documen...
Ben Russell [Wed, 13 Nov 2013 23:05:10 +0000 (23:05 +0000)] 
COUCHDB-1930 - fix - Futon, create New Document and change _id, clicking Save Document will save but sends you to wrong doc

8 years agoMerge branch 'remove-e4x-tests'
Jan Lehnardt [Mon, 7 Oct 2013 16:46:14 +0000 (18:46 +0200)] 
Merge branch 'remove-e4x-tests'

* remove-e4x-tests:
  remove E4X tests

9 years agoMerge branch '1888-fix-user-fields-disabled-for-admins'
Jan Lehnardt [Thu, 3 Oct 2013 15:59:18 +0000 (17:59 +0200)] 
Merge branch '1888-fix-user-fields-disabled-for-admins'

* 1888-fix-user-fields-disabled-for-admins:
  admins can always read all doc fields, regardless of public_fields

9 years agoadmins can always read all doc fields, regardless of public_fields
Jan Lehnardt [Wed, 25 Sep 2013 15:40:14 +0000 (17:40 +0200)] 
admins can always read all doc fields, regardless of public_fields

Closes COUCHDB-1888

9 years agounlink plugins from Futon & Fauxton
Jan Lehnardt [Wed, 2 Oct 2013 17:43:01 +0000 (19:43 +0200)] 
unlink plugins from Futon & Fauxton

9 years agoonly install plugins if their CouchDB version matches the target couch
Jan Lehnardt [Fri, 2 Aug 2013 21:09:01 +0000 (23:09 +0200)] 
only install plugins if their CouchDB version matches the target couch

9 years agoadd `uninstall()`, removed unneeded aplication:load() cruft
Jan Lehnardt [Fri, 2 Aug 2013 20:06:02 +0000 (22:06 +0200)] 
add `uninstall()`, removed unneeded aplication:load() cruft

9 years agocheck if plugins are already installed& better install feedback
Jan Lehnardt [Thu, 1 Aug 2013 16:56:07 +0000 (18:56 +0200)] 
check if plugins are already installed& better install feedback

9 years agoadd couchperuser
Jan Lehnardt [Thu, 1 Aug 2013 16:19:52 +0000 (18:19 +0200)] 
add couchperuser

9 years agoupdate hash & version for faux geocouch release
Jan Lehnardt [Thu, 1 Aug 2013 15:07:57 +0000 (17:07 +0200)] 
update hash & version for faux geocouch release

9 years agohook up futon to /_plugins
Jan Lehnardt [Wed, 31 Jul 2013 16:49:32 +0000 (18:49 +0200)] 
hook up futon to /_plugins

9 years agoCompiled Fauxton for experimental release.
suelockwood [Wed, 2 Oct 2013 19:07:15 +0000 (15:07 -0400)] 
Compiled Fauxton for experimental release.

9 years agoremove E4X tests
Jan Lehnardt [Mon, 30 Sep 2013 16:32:38 +0000 (18:32 +0200)] 
remove E4X tests

9 years agoadd `users_db_public` config var
Jan Lehnardt [Wed, 7 Aug 2013 13:45:16 +0000 (15:45 +0200)] 
add `users_db_public` config var

9 years agofix test for 8d7ab8b. cc COUCHDB-1838
Jan Lehnardt [Wed, 7 Aug 2013 14:11:59 +0000 (16:11 +0200)] 
fix test for 8d7ab8b. cc COUCHDB-1838

9 years agoMerge remote-tracking branch 'adamlofts/1493-fix-zerobyte-json-parsing'
Dirkjan Ochtman [Sat, 3 Aug 2013 16:22:30 +0000 (18:22 +0200)] 
Merge remote-tracking branch 'adamlofts/1493-fix-zerobyte-json-parsing'

9 years agoApply _list functions for _all_docs view. COUCHDB-1139
Alexander Shorin [Wed, 24 Jul 2013 14:12:03 +0000 (18:12 +0400)] 
Apply _list functions for _all_docs view. COUCHDB-1139

9 years agoAdd tests for COUCHDB-1493
Adam Lofts [Tue, 23 Jul 2013 10:25:56 +0000 (11:25 +0100)] 
Add tests for COUCHDB-1493

9 years agoSupport Last-Event-ID header for eventsource changes feeds
Damjan Georgievski [Sat, 20 Jul 2013 14:46:04 +0000 (15:46 +0100)] 
Support Last-Event-ID header for eventsource changes feeds

COUCHDB-1852

9 years agoAdd a configurable whitelist of public user props
Robert Newson [Fri, 21 Jun 2013 10:01:13 +0000 (11:01 +0100)] 
Add a configurable whitelist of public user props

By default no user properties are public and attempts to view a users
document other than your own will return a 404. If the public_fields
setting of the users_db config section is set to a list of field
names, however, you will see that subset of fields for any user.

Also, if `public_fields` is set and non-empty,
`_users/_all_docs?include_docs=true` will return documents with stripped
field.

Contributed with code parts from @indutny

9 years agoAllow storing a pre-hashed admin password
Jason Smith (work) [Fri, 31 May 2013 18:06:25 +0000 (18:06 +0000)] 
Allow storing a pre-hashed admin password

When duplicating a couch, it is difficult to copy the _config/admins/*
values. Storing the encoded value does not work because that value is
re-hashed when stored. (Your password is the literal string
"-pbkdf2-abcdef...".)

This change will store any config setting unmodified if ?raw=true is
in the query string.

Updating _config/admins/* already requires admin privileges, so there is
no change to the security.

9 years agoAdd tests for passwords beginning with :
Robert Newson [Mon, 19 Nov 2012 10:55:57 +0000 (10:55 +0000)] 
Add tests for passwords beginning with :

9 years agoPUT call to database that is not guaranted to exist.
Wendall Cada [Fri, 5 Apr 2013 18:41:40 +0000 (11:41 -0700)] 
PUT call to database that is not guaranted to exist.

9 years agoCreating existing database causes test to fail. Allowing config PUT to create replica...
Wendall Cada [Fri, 5 Apr 2013 18:40:42 +0000 (11:40 -0700)] 
Creating existing database causes test to fail. Allowing config PUT to create replicator db.

9 years agoEnsure that waitForSuccess calls have return values.
Wendall Cada [Fri, 5 Apr 2013 18:38:20 +0000 (11:38 -0700)] 
Ensure that waitForSuccess calls have return values.

9 years agoTest form-urlencoded doc update
Johannes J. Schmidt [Wed, 27 Mar 2013 23:11:26 +0000 (00:11 +0100)] 
Test form-urlencoded doc update

Update handlers have access to a form object parsed from an
application/x-www-form-urlencoded request.

9 years agoTest attachment upload via multipart/form-data
Johannes J. Schmidt [Wed, 27 Mar 2013 22:59:16 +0000 (23:59 +0100)] 
Test attachment upload via multipart/form-data

This is used in Futon attachment upload.

9 years agoReally fix `make check-js`. Sorry.
Jan Lehnardt [Fri, 15 Mar 2013 16:34:07 +0000 (17:34 +0100)] 
Really fix `make check-js`. Sorry.

9 years agofix `make check-js`
Jan Lehnardt [Fri, 15 Mar 2013 15:47:22 +0000 (16:47 +0100)] 
fix `make check-js`

9 years agoDo not run attachment_ranges.js in Chrome as Chrome is broken there.
Jan Lehnardt [Thu, 14 Mar 2013 19:13:02 +0000 (20:13 +0100)] 
Do not run attachment_ranges.js in Chrome as Chrome is broken there.

9 years agoDisable link to Futon test suite
Noah Slater [Sun, 10 Mar 2013 22:48:24 +0000 (22:48 +0000)] 
Disable link to Futon test suite

9 years agoReset rewrite counter on new request
Robert Newson [Sat, 16 Feb 2013 11:07:55 +0000 (11:07 +0000)] 
Reset rewrite counter on new request

We were spuriously throwing rewrite limit exceeded for non-looping
rewrites. This patch resets the count to zero at the start of a new
request and adds a test.

COUCHDB-1651

9 years agoMerge branch '1675-fix-roles-validation'
Robert Newson [Mon, 11 Feb 2013 13:25:36 +0000 (13:25 +0000)] 
Merge branch '1675-fix-roles-validation'

9 years agoOnly allow strings in user doc "roles" array
Robert Newson [Sun, 10 Feb 2013 10:52:24 +0000 (10:52 +0000)] 
Only allow strings in user doc "roles" array

We validate that _security documents only contain strings but we have
not done the same for the roles field in user docs. This is a breaking
change as users may have been inserting other things (notably,
objects) in this field.

COUCHDB-1675

9 years agorefactor replicator_db_security to be more resilient
Jan Lehnardt [Fri, 8 Feb 2013 19:35:56 +0000 (20:35 +0100)] 
refactor replicator_db_security to be more resilient

9 years agosplit replicator_db tests
Jan Lehnardt [Sun, 13 Jan 2013 14:22:01 +0000 (15:22 +0100)] 
split replicator_db tests

9 years agoAvoid badmatch when replicator dbnames have leading slashes.
Jan Lehnardt [Sat, 26 Jan 2013 17:14:42 +0000 (18:14 +0100)] 
Avoid badmatch when replicator dbnames have leading slashes.

Closes COUCHDB-317

Patch by Joan Touzet.

9 years agoupdate jquery to 1.8.3
Jan Lehnardt [Mon, 12 Nov 2012 21:06:51 +0000 (22:06 +0100)] 
update jquery to 1.8.3

9 years agoSend attachment headers in multipart responses
Jan Lehnardt [Wed, 14 Nov 2012 13:59:58 +0000 (14:59 +0100)] 
Send attachment headers in multipart responses

Closes COUCHDB-1368

Patch by:
 - Jan Lehnardt
 - Robert Newson

9 years agoIgnore multipart epilogue
Robert Newson [Wed, 19 Dec 2012 10:18:36 +0000 (10:18 +0000)] 
Ignore multipart epilogue

COUCHDB-1632

9 years agoImprove script url validation
Robert Newson [Tue, 18 Dec 2012 15:11:41 +0000 (15:11 +0000)] 
Improve script url validation

9 years agoUse non-compressed Content-Type in attachments test suites
Dave Cottlehuber [Sun, 15 Jan 2012 22:38:13 +0000 (23:38 +0100)] 
Use non-compressed Content-Type in attachments test suites

MD5-Digests of attachments are calculated on the compressed data if the
attachment MIME type is compressible, as defined in default.ini
[attachments] compressible_types

Windows uses a different gzip implementation, and therefore generates
different MD5-Digests than other platforms. Using binary Content-Type
resolves this.

9 years agoAdd docs and search links into Futon
Noah Slater [Mon, 3 Dec 2012 09:06:29 +0000 (10:06 +0100)] 
Add docs and search links into Futon

9 years agouse more docs in view_compaction test to ensure a difference
Jan Lehnardt [Wed, 5 Dec 2012 15:26:37 +0000 (16:26 +0100)] 
use more docs in view_compaction test to ensure a difference

9 years agoCOUCHDB-430,514,764 Fix list HTTP header handling.
Caleb Case [Sun, 15 Apr 2012 16:12:03 +0000 (12:12 -0400)] 
COUCHDB-430,514,764 Fix list HTTP header handling.

Currently calls to getRow() cause the HTTP headers to be sent immediately back
to the client. This happens even if an error is thrown after the getRow(), but
before any send(...) or start(...). Worse, if a list throws an exception an
extra, invalid header is sent to the client (resulting in various bad
behavior).

Erlang list handling will now wait until data has been sent BEFORE sending the
HTTP headers to the client. If an error is reported it will result in an HTTP
error code as expected. This does not change the behavior of errors thrown
AFTER data has been sent: They will still result in an HTTP 200 even if an
error is reported.

The line protocol between Erlang and os processes has been extended to support
an optional Header field on "chunks" and "end". The javascript list handling
has been updated to use this if a new header is set via start(...). This makes
it possible to begin processing with getRow(), but later reset the headers via
start(...). Again, if data has been sent(...) the new headers will NOT take
effect.

COUCHDB-430
COUCHDB-514
COUCHDB-764

9 years agoReturn X-Couch-Id from show functions if doc is created
Robert Newson [Wed, 21 Nov 2012 14:01:46 +0000 (14:01 +0000)] 
Return X-Couch-Id from show functions if doc is created

9 years agotest for 1608
Robert Newson [Wed, 21 Nov 2012 13:00:31 +0000 (13:00 +0000)] 
test for 1608

9 years agoRevert "Document Id and Rev in response headers" patch
Robert Newson [Wed, 21 Nov 2012 13:03:04 +0000 (13:03 +0000)] 
Revert "Document Id and Rev in response headers" patch

This patch breaks some update handlers and also assumes that any JSON
response body with a property called 'id' is the actual id of a
created or updated document.

This reverts;
0a64f310b43b90176bb59040e7e866978c429c88
4edbb93d2271ac1eb82f4d2bb072b8bdf6829f85
b9af7ea506ac95034a91951f29e1f4249ef4317c

9 years agoWork around race conditions in tests on faster hardware.
Jan Lehnardt [Tue, 13 Nov 2012 18:07:22 +0000 (19:07 +0100)] 
Work around race conditions in tests on faster hardware.

THIS NEEDS A PROPER FIX.

9 years agoTest the X-Couch-Id header
Benjamin Nortier [Fri, 2 Nov 2012 12:46:20 +0000 (12:46 +0000)] 
Test the X-Couch-Id header

9 years agoMerged pull request #7 from @mikeymckay, with thanks
Mike McKay [Thu, 1 Nov 2012 00:46:24 +0000 (01:46 +0100)] 
Merged pull request #7 from @mikeymckay, with thanks

9 years agodisallow https for remote loading as well
Robin Berjon [Thu, 25 Oct 2012 13:06:06 +0000 (15:06 +0200)] 
disallow https for remote loading as well

9 years agoCOUCHDB-1563 ensures urlPrefix is set in all ajax requests
Keks Keksov [Wed, 24 Oct 2012 22:29:02 +0000 (00:29 +0200)] 
COUCHDB-1563 ensures urlPrefix is set in all ajax requests

9 years agoEnsure JSpec tests are actually run. Continued in COUCHDB-1566.
Alexander Shorin [Wed, 24 Oct 2012 18:36:26 +0000 (20:36 +0200)] 
Ensure JSpec tests are actually run. Continued in COUCHDB-1566.

10 years agoCOUCHDB-1026 - encode database name when rewriting
Robert Newson [Fri, 31 Aug 2012 11:16:17 +0000 (12:16 +0100)] 
COUCHDB-1026 - encode database name when rewriting

10 years agoAdd utc_id_suffix UUID algorithm
NickNorth [Mon, 6 Aug 2012 10:02:44 +0000 (11:02 +0100)] 
Add utc_id_suffix UUID algorithm

10 years agoCOUCHDB-1511 - User docs require doc.roles
Robert Newson [Mon, 30 Jul 2012 11:53:33 +0000 (12:53 +0100)] 
COUCHDB-1511 - User docs require doc.roles

A _users doc must include roles otherwise the user receives an opaque
error. This patch throws an error if it is missing and adds a test to
verify that the user receives a readable error message.

10 years agosince=now. Get changes from now. close #COUCHDB-1501
benoitc [Fri, 22 Jun 2012 20:33:25 +0000 (22:33 +0200)] 
since=now. Get changes from now. close #COUCHDB-1501

10 years agoAdd test cases for empty keys query parameter
Adam Lofts [Sun, 20 May 2012 13:12:03 +0000 (14:12 +0100)] 
Add test cases for empty keys query parameter

10 years agoCOUCH-1470 - added error handling for opening missing document in futon.
Anthony S Baker [Fri, 11 May 2012 20:23:30 +0000 (16:23 -0400)] 
COUCH-1470 - added error handling for opening missing document in futon.
Also made all js alert error messages have the same format.

10 years agoUse ajax helper function for _session GET request to stop request cache in IE7
Ewan McDougall [Thu, 7 Jun 2012 11:34:54 +0000 (13:34 +0200)] 
Use ajax helper function for _session GET request to stop request cache in IE7

10 years agoCOUCHDB-1483 - Update handlers must produce valid doc ids
Robert Newson [Sat, 26 May 2012 19:36:11 +0000 (20:36 +0100)] 
COUCHDB-1483 - Update handlers must produce valid doc ids

10 years agoCOUCHDB-1473 & COUCHDB-1472 - Futon: disable buttons if user has insufficient rights
Anthony S Baker [Wed, 9 May 2012 17:56:25 +0000 (13:56 -0400)] 
COUCHDB-1473 & COUCHDB-1472 - Futon: disable buttons if user has insufficient rights

- Disabled the delete database button if it is not in adminparty,
 or if the current user is not admin.
- Security button is also disabled if user is not a database admin.

10 years agofix changes test to make it wokr on all browsers
benoitc [Wed, 16 May 2012 05:48:27 +0000 (07:48 +0200)] 
fix changes test to make it wokr on all browsers

10 years agofix whitespaces
benoitc [Wed, 16 May 2012 05:48:14 +0000 (07:48 +0200)] 
fix whitespaces

10 years agoadd Server-Sent Events protocol to db changes API. close #COUCHDB-986
benoitc [Wed, 16 May 2012 05:30:19 +0000 (07:30 +0200)] 
add Server-Sent Events protocol to db changes API. close #COUCHDB-986

This patch add support for the new specification of w3c by adding a new
feed type named `eventsource`:

http://www.w3.org/TR/2009/WD-eventsource-20090423/

This patch is based on @indutny patch with edits.

10 years agoUse TEquals for great good
Robert Newson [Thu, 26 Apr 2012 13:49:55 +0000 (14:49 +0100)] 
Use TEquals for great good

10 years agoLimit rewrite recursion depth
Ronny Pfannschmidt [Wed, 28 Mar 2012 14:58:20 +0000 (16:58 +0200)] 
Limit rewrite recursion depth

Loops in the rewriter would end up pegging the CPU until memory was
exhausted. Max recursion is now configurable and limited to 100
iterations.

Fixes: COUCHDB-1441

10 years agoDo not overwrite X-CouchDB-Requested-Path
Ronny Pfannschmidt [Fri, 23 Mar 2012 19:52:17 +0000 (20:52 +0100)] 
Do not overwrite X-CouchDB-Requested-Path

Repeated rewrites would replace the initial value of
X-CouchDB-Requested-Path.

Fixes: COUCHDB-1442

10 years agoFixing the replicator_db JS test
Paul Joseph Davis [Mon, 26 Mar 2012 20:17:02 +0000 (15:17 -0500)] 
Fixing the replicator_db JS test

10 years agoFix race condition in the auth db creation
Paul Joseph Davis [Sun, 25 Mar 2012 10:46:15 +0000 (05:46 -0500)] 
Fix race condition in the auth db creation

This test deletes a database and then tries to go and write to it
without ensuring that it exists. This is just a race with the auth cache
code trying to recreate its own database. This addition just makes sure
it exists by trying to create it and ignoring any 412 errors if the auth
cache won the race.

10 years agoFix random failures in replication.js test
Paul Joseph Davis [Sun, 25 Mar 2012 01:17:28 +0000 (20:17 -0500)] 
Fix random failures in replication.js test

This should fix the random failures for the 'expected "25" got "31"
error message that pops up occasionally. If my hunch is correct when we
remove the two docs from the source db its possible to get the writes on
the target out of order depending on a race condition.

This just sleeps a bit in between the deletions to try and reduce that
possibility. I haven't spotted this error after applying this patch.

10 years agoCOUCHDB-1060 - Fix tests
Robert Newson [Fri, 6 Apr 2012 16:24:25 +0000 (12:24 -0400)] 
COUCHDB-1060 - Fix tests

10 years agoSimplify changes.js test
Robert Newson [Thu, 29 Mar 2012 11:48:11 +0000 (12:48 +0100)] 
Simplify changes.js test

The changes.js test for filter=_view emits a key when it is only
necessary to emit a row. I've emitted (null, null) to clarify that.

10 years agoFix fold reduce with non-inclusive end key
Filipe David Borba Manana [Sat, 18 Feb 2012 06:07:27 +0000 (06:07 +0000)] 
Fix fold reduce with non-inclusive end key

Fold reducing a btree with with end_key_gt was not producing
the correct values. For example, for view queries with startkey
and starkey_docid and/or endkey and endkey_docid and inclusive_end
set to false, the doc ID component of the view keys was not
respected.
Example query:

http://server:5984/db/_design/test/_view/myview?startkey=4&endkey=6&endkey_docid=5&inclusive_end=false

Closes COUCHDB-1413

10 years agomake /_users/_changes admin-only
Jan Lehnardt [Thu, 16 Feb 2012 15:36:42 +0000 (16:36 +0100)] 
make /_users/_changes admin-only

10 years agofix comments & whitespace in tests
Jan Lehnardt [Thu, 16 Feb 2012 15:29:06 +0000 (16:29 +0100)] 
fix comments & whitespace in tests

10 years agoCOUCHDB-1381 - Don't call alert() from jquery.couch.js
Sam Bisbee [Sat, 18 Feb 2012 15:20:36 +0000 (15:20 +0000)] 
COUCHDB-1381 - Don't call alert() from jquery.couch.js

jquery.couch.js is a javascript library and should not assume it's
running inside a browser. Particularly, it should not call
alert(). Instead it should throw an exception.

10 years agoAdd artificial delay to admin-creation to work around WebKit
Jan Lehnardt [Mon, 13 Feb 2012 11:57:13 +0000 (12:57 +0100)] 
Add artificial delay to admin-creation to work around WebKit

WebKit browsers seem to execute the success callback too fast for
CouchDB to complete the _config PUT for creating admins. We'll
be waiting for 200ms to let CouchDB catch up.

10 years agofix whitespace
Jan Lehnardt [Mon, 13 Feb 2012 11:56:26 +0000 (12:56 +0100)] 
fix whitespace

10 years agoFix JS tests for COUCHDB-1338
Randall Leeds [Thu, 15 Dec 2011 06:52:13 +0000 (22:52 -0800)] 
Fix JS tests for COUCHDB-1338

Fix two bad assumptions:

- The server restarts on the same port

  Change replicator_db test which verifies that replications described
  by _replicator documents survive restart to use non-HTTP db references.

- The config port matches the port in the CouchDB request URL.

10 years agoCOUCHDB-111 and COUCHDB-1389 JS Error Tracebacks
Randall Leeds [Fri, 16 Dec 2011 03:49:34 +0000 (19:49 -0800)] 
COUCHDB-111 and COUCHDB-1389 JS Error Tracebacks

couchjs:
- report stacktraces on exceptions using JS_ReportError

- responds with a trace and message on errors when possible

- propogate Error-like objects from validate_doc_update to the loop

- make Error-like object play nicely with couch_os_process

couch.js:

- transform HTTP error response bodies into an Error instance to
  capture stack information

cli tests:

- print a stacktrace for individual test failures when running the suite

Fix COUCHDB-111
Fix COUCHDB-1389

10 years agoFixing COUCHDB-1383: update the in memory state of the view on save.
Sam Bisbee [Wed, 18 Jan 2012 16:02:43 +0000 (11:02 -0500)] 
Fixing COUCHDB-1383: update the in memory state of the view on save.

10 years agoimprove the startup delay for js test harness
Randall Leeds [Fri, 16 Dec 2011 03:49:55 +0000 (19:49 -0800)] 
improve the startup delay for js test harness

Change waitForSuccess to catch errors in the sync request that's used
to hand control back to the JS engine. Then, use waitForSuccess to
see if CouchDB has started and remove the 1 second sleep before the
tests start.

10 years agoCache-bust every attachment range GET
Robert Newson [Sat, 7 Jan 2012 15:57:04 +0000 (15:57 +0000)] 
Cache-bust every attachment range GET

This appears to expose a bug in Chrome for an edge case. There's a
test that sends "Range: bytes=0-29" for an item that is one byte
shorter than the requested range. Curl, Firefox and Safari correctly
returns;

Content-Range: bytes 0-28/29
Content-Length: 29

Whereas Safari erroneously gets this;

Content-Range: bytes 0-29/29
Content-Length: 30

So, this test will fail on Chrome until a) Chrome is fixed or b)
someone points out that I'm wrong about the Chrome bug.

10 years agoAdd a cache buster for Chrome to attachment_ranges test
Jan Lehnardt [Sat, 7 Jan 2012 14:46:23 +0000 (15:46 +0100)] 
Add a cache buster for Chrome to attachment_ranges test

10 years agoRemove console.log() statements from test
Filipe David Borba Manana [Thu, 5 Jan 2012 18:47:43 +0000 (18:47 +0000)] 
Remove console.log() statements from test

10 years agoAllow OAuth credentials to be stored in user documents
Filipe David Borba Manana [Wed, 4 Jan 2012 15:51:00 +0000 (15:51 +0000)] 
Allow OAuth credentials to be stored in user documents

If the ini configuration parameter `use_users_db` (section
`couch_httpd_oauth`) is set to true, OAuth credentials can
be stored in user documents (system database _users) instead.
The credentials are stored in a top level propery of user
documents named `oauth`. Example:

     {
         "_id": "org.couchdb.user:joe",
         "type": "user",
         "name": "joe",
         "password_sha": "fe95df1ca59a9b567bdca5cbaf8412abd6e06121",
         "salt": "4e170ffeb6f34daecfd814dfb4001a73"
         "roles": ["foo", "bar"],
         "oauth": {
             "consumer_keys": {
                 "consumerKey1": "key1Secret",
                 "consumerKey2": "key2Secret"
             },
             "tokens": {
                 "token1": "token1Secret",
                 "token2": "token2Secret"
             }
         }
     }

Closes COUCHDB-1238.

10 years agoFix admin users creation and user password change in futon.
benoitc [Sat, 3 Dec 2011 05:13:34 +0000 (06:13 +0100)] 
Fix admin users creation and user password change in futon.

main patch from jan, reviewed & updated by me.

10 years agoJavaScript tests for System Database Security
Jan Lehnardt [Thu, 22 Dec 2011 17:45:23 +0000 (18:45 +0100)] 
JavaScript tests for System Database Security

10 years agofix whitespace
Jan Lehnardt [Fri, 25 Nov 2011 19:13:12 +0000 (20:13 +0100)] 
fix whitespace

10 years agoremove trailing whitespace
Jan Lehnardt [Thu, 17 Nov 2011 11:26:31 +0000 (12:26 +0100)] 
remove trailing whitespace

10 years agoClear credentials cache if _users db crashes
Filipe David Borba Manana [Tue, 6 Dec 2011 22:21:42 +0000 (22:21 +0000)] 
Clear credentials cache if _users db crashes

COUCHDB-1357

10 years agofix COUCHDB-1361 - unquoted port in js config test
Randall Leeds [Mon, 12 Dec 2011 22:21:38 +0000 (14:21 -0800)] 
fix COUCHDB-1361 - unquoted port in js config test

TEquals() does a triple equals comparison so the type needs to agree.
Configuration values are strings.

10 years agoInclude replicion doc id in _active_tasks
Filipe David Borba Manana [Mon, 5 Dec 2011 19:45:21 +0000 (19:45 +0000)] 
Include replicion doc id in _active_tasks

COUCHDB-1349

10 years agoAdd stats to replication docs
Filipe David Borba Manana [Mon, 5 Dec 2011 18:30:47 +0000 (18:30 +0000)] 
Add stats to replication docs

When a replication finishes, add its stats to the respective
document. These are the same stats as provided by the active
tasks API.

COUCHDB-1349

10 years agoFix replicator db changes loop crash after _security update
Filipe David Borba Manana [Fri, 2 Dec 2011 12:47:26 +0000 (12:47 +0000)] 
Fix replicator db changes loop crash after _security update

The changes feed loop on the replicator database would crash
if this database's _security object was updated.

Closes COUCHDB-1353.

10 years agoFailing test for duplicates in bulk docs
Bob Dionne [Tue, 11 Oct 2011 18:20:21 +0000 (14:20 -0400)] 
Failing test for duplicates in bulk docs

If a duplicate or worse yet, two different docs with the same id is
contained in a bullk docs save, both are returned as in conflict but
one is actually saved, usually the second one.

jira-911

10 years agoFix OAuth validation when using the rewriter.
Jan Lehnardt [Sun, 13 Nov 2011 12:06:16 +0000 (13:06 +0100)] 
Fix OAuth validation when using the rewriter.

Patch by Klaus Trainer.

Closes COUCHDB-1321