| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
| |
This allows users to verify that compaction processes are suspended
outside of any configured strict_window.
|
| |
|
|
|
|
|
| |
chunked (#3360)
Transfer-Encoding: chunked causes the server to wait indefinitely, then issue a a 500 error when the client finally hangs up, when PUTing a multipart/related document + attachments.
This commit fixes that issue by adding proper handling for chunked multipart/related requests.
|
| |
|
|
|
| |
All endpoints but _session support gzip encoding and there's no practical reason for that.
This commit enables gzip decoding on compressed requests to _session.
|
| |
|
|
|
|
|
| |
When we call `couch_httpd:json_body/1` we can have `req_body` already set.
In this case we should return the field as is without any attempt to
decompress or decode it. This PR brings the approach we use in `chttpd`
into `couch_httpd`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A document with lots of conflicts can blow up couchjs if the user
calls _changes with a javascript filter and with `style=all_docs` as
this option causes up to fetch all the conflicts.
All leaf revisions of the document are then passed in a single call to
ddoc_prompt, which can fail if there's a lot of them.
In that event, we simply try them sequentially and assemble the
response from each call.
Should be backported to 3.x
|
| | |
|
| |
|
|
|
| |
These are a few micro optimizations to avoid unnecessary work when
reading from a single reduce function during a view read.
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
This fixes a94e693f32672e4613bce0d80d0b9660f85275ea because a race
condition exisited where the 'DOWN' message could be received
before the compactor pid is spawned. Adding a synchronous call to
get the compactor pid guarantees that the couch_db_updater process
handling of finish_compaction has occurred.
|
| | |
| |
| |
| |
| |
| | |
When building couch_js in RHEL, there is one error occurring with "undefined
reference to symbol '_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3'".
This commit is to adjust binding library to address this issue.
|
| | | |
|
| | |
| |
| |
| |
| | |
This will only report "fips" in the welcome message if FIPS mode
was enabled at boot (i.e, in vm.args).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #2906
* Added a suffix to the first line of couchjs with the (static) version number compiled
* Update rebar.config.script
* In couchjs -h replaced the link to jira with a link to github
Co-authored-by: simon.klassen <simon.klassen>
Co-authored-by: Jan Lehnardt <jan@apache.org
|
| | |
| |
| |
| |
| |
| |
| | |
e.g;
[jwt]
required_claims = {iss, "https://example.com/issuer"}
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Mozilla did this years ago:
https://hg.mozilla.org/mozilla-central/rev/41d9d32ab5a7
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Remove unused string conversion functions
* Set UTF-8 encoding when compiling scripts
* Encode JavaScript strings as UTF-8 for printing
* Check that only strings are passed to print
* Use builtin UTF-8 conversions in http.cpp
* Add tests for couchjs UTF-8 support
* Remove custom UTF-8 conversion functions
We're now using 100% built-in functionality of SpiderMonkey to handle
all UTF-8 conversions.
* Report error messages at global scope
Previously we weren't reporting any uncaught exceptions or compilation
errors. This changes that to print any compilation errors or any
uncaught exceptions with stack traces.
The previous implementation of `couch_error` was attempting to call
`String.replace` on the `stack` member string of the thrown exception.
This likely never worked and attempting to fix I was unable to properly
invoke the `String.replace` function. This changes the implementation to
use the builtin stack formatting method instead.
* Modernize sources to minimize changes for 68
These are a handful of changes that modernize various aspects of the
couchjs 60 source files. Behaviorally they're all benign but will
shorten the diff required for adding support for SpiderMonkey 68.
Co-authored-by: Joan Touzet <wohali@apache.org>
|
| | |
| |
| |
| |
| |
| | |
This copy slowed down the `erlang:spawn_link/3` call considerably.
Measurements in the wild showed the cost of that `spawn_link/3` going
from roughly 8 uS to 800 uS.
|
| | | |
|
| | |
| |
| |
| |
| | |
This mechanism is replaced by the much stronger tying of verification
algorithm to the key directly in the server config.
|
| | | |
|
| | | |
|
| | |
| |
| | |
Add support for roles to be obtained from JWTs
|
| | | |
|
| | |
| |
| |
| |
| | |
Decoding RSA and EC keys is a little expensive and we don't want to do
it for every single request. Add a cache that is invalidated on config change.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Add JWT Authentication Handler
Co-authored-by: Robert Newson <rnewson@apache.org>
Co-authored-by: Joan Touzet <wohali@users.noreply.github.com>
|
| | |
| |
| |
| | |
Closes #2655
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the data was read from the parser in the transaction. If the
transaction had to retry, for example, because of a conflict, the parser would
have been drained and exited resulting the request failing with a 500
"mp_parser noproc" error.
Since FDB cannot handle transactions larger than 10MB opt to read the
attachment data into memory first, before the transaction starts.
|
| | |
| |
| |
| |
| |
| | |
When building couch_js in RHEL, there is one error occurring with "undefined
reference to symbol '_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3'".
This commit is to adjust binding library to address this issue.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A new application, aegis, is introduced to provide strong at-rest
protection of CouchDB data (where possible).
Currently we encrypt the following values (if enabled):
1. Document content
2. Attachment content
3. Index values
Things not encrypted:
1. _all_docs
2. _changes
3. doc id
4. doc rev
5. Index keys
6. All other metadata
Co-Authored-By: Eric Avdey <eiri@apache.org>
Co-Authored-By: Robert Samuel Newson <rnewson@apache.org>
|
| | |
| |
| |
| |
| |
| |
| | |
Currently, GET `/_session` reports the `authentication_db` of the
obsolete admin port 5986. This updates it to report the actual db used
for authentication, provided it is configured. Otherwise, it omits
`authentication_db` entirely from session info.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This change allows creation of local `src/couch/rebar.config` and `rebar.config`
files to set additional configuration options. This is useful for:
- disabling deprecation warnings `{nowarn_deprecated_function, MFAs}`
- control debugging in eunit tests
- `DEBUG` - `{eunit_compile_opts, [{d, DEBUG, true}]}`
- `NODEBUG` - `{eunit_compile_opts, [{d, NODEBUG, true}]}`
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Enable running all chttpd tests. Some fixes needed for this to happen are:
* Some tests were not valid (checking shard maps, etc) and were deleted
* Some tests were disabled either because functionality is not implemented yet
or simply to minimize the diff between 3.x and this branch for when we have
to rebase
* Some applications used for index querying had to be started explicitly
* Mock updated to use new version of modules instead of old ones
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removes the following features from the welcome message:
- reshard
- partitioned
- pluggable-storage-engines
- scheduler
Although `scheduler` at least will presumably be returned once that
feature is complete.
|
| | |
| |
| |
| |
| |
| | |
For use by the native couchdb at-rest encryption feature.
* From NIST Special Publication 800-38F.
|
| | |
| |
| |
| |
| | |
We started to emit that in CouchDB 4.x for temporary views and possibly other
endpoints.
|
| | |
| |
| |
| |
| | |
Versionstamp sequences should always be binaries when retrieved from a
rev info map.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This tracks the number of bytes that would be required to store the
contents of a database as flat files on disk. Currently the following
items are tracked:
* Doc ids
* Revisions
* Doc body as JSON
* Attachment names
* Attachment type
* Attachment length
* Attachment md5s
* Attachment headers
* Local doc id
* Local doc revision
* Local doc bodies
|
| | |
| |
| |
| |
| | |
I accidentally ported part of the old couch_att test suite into an
actual "feature" that's not actually accessible through any API.
|