485 Commits (80cf4d191d3ae37e753ff9f01f90ddc264d2c1d1)
 

Author SHA1 Message Date
Nicolas Favre-Felix 80cf4d191d
Disable CircleCI 4 years ago
Jessie Murray b3eded6a1c
Add build (+ test) workflow for GitHub Actions (#191)
Performs the same tasks as on CircleCI and adds badge to README.md.
No change made to the CircleCI config.
4 years ago
Jessie Murray 1cd2a8b934
Add support for REDIS_REPLY_STATUS in nested JSON (#189)
When strings are added as elements of an array but typed as
REDIS_REPLY_STATUS instead of REDIS_REPLY_STRING, Webdis encodes them as
nulls. REDIS_REPLY_STATUS should only be encoded as [true, str] or
[false, str] when this is a top-level status response, not an array
element. In these cases we only need the string.

Fixes #188
4 years ago
Jessie Murray 53f483fb6a
Make fsync frequency configurable for log file (#187)
Webdis used to call fsync after every single log message, which had a
significant negative impact on performance. This change introduces 3
config options for fsync: no explicit fsync (the new default), a periodic
fsync called every N milliseconds, or the old behavior.

The new config key is also documented and validates its inputs.
4 years ago
Jessie Murray 2e71e85f4f Add explicit cast to msgpack callback 4 years ago
Jessie Murray efbd274294 Add "fall through" comments in switch to disable warning 4 years ago
Jessie Murray 24b09bb372 Remove strncpy false positive warning in slog.c
Use memcpy instead
4 years ago
Jessie Murray 34c51efc5e Add __attribute__ ((unused)) in dict.c
Checks for __GNUC__ to see if __attribute__ is available
4 years ago
Jessie Murray e3a29117e7 Fix warnings in conf.c
1. Remove unused size_t sz variable
2. Remove const on free()'d variable
4 years ago
Nicolas Favre-Felix 639026ec33
Remove unused .travis.yml 4 years ago
Nicolas Favre-Felix 726c96fb89
Update alpine base image for OpenSSL fix
Resolves:
* https://snyk.io/vuln/SNYK-ALPINE312-OPENSSL-1075734
* https://snyk.io/vuln/SNYK-ALPINE312-OPENSSL-1075735
* https://snyk.io/vuln/SNYK-ALPINE312-OPENSSL-1075736
4 years ago
Nicolas Favre-Felix c6d5d20de7
Post-release version bump and README update 4 years ago
Nicolas Favre-Felix d7738afd58
Release 0.1.13
* Adds support for Redis 6.0 auth
* Fixes one-time leak of 26 bytes when reading the config file
4 years ago
Nicolas Favre-Felix 875ca6fb74
Add Redis auth section in README 4 years ago
Jessie Murray 4bc0871006
Fix small leaks in conf.c (fixes #184) (#185)
1. plaintext was not free'd after encoding credentials
2. ACL commands were duplicated when there was no need to

In both cases the value came from conf_string_or_envvar which always
uses strdup.
4 years ago
Jessie Murray fd3ec5d3ba Fixes for PR #183
Stop logging an error when auth is disabled and free all the fields of
redis_auth.
4 years ago
Jessie Murray 0177479cc5 Log Redis auth response
We were ignoring the response sent by Redis for AUTH commands. This
commit adds a callback which logs the response; I've tested it with
valid and invalid credentials and the log message is correct in both
cases. There's a lock on the server object to only log this once; I
tried adding it on the pool object but there's one pool per thread so
we still ended up with multiple messages.
4 years ago
Jessie Murray 09bd76f3a8 slog.c: Change level symbol to a single letter
A single symbol was added to the log depending on the level, one of ".-*#"
This had an issue: there were only 4 symbols but there are 5 levels; in
addition a `%b` was used which logged a number instead of a letter.
This commit changes the logic to add a single uppercase letter instead,
based on the level (e.g. WEBDIS_ERROR is E, _INFO is I, etc.)
4 years ago
Jessie Murray 02d60dc548 Implement Redis v6 auth (fixes #182)
* Change redis_auth in struct conf to handle old and new auth
* Update cfg.c to understand an array of two strings for redis_auth
* Update pool.c to send both username and password
4 years ago
Nicolas Favre-Felix 7fdfef0d8d
Change `docker run` command to expose port 7379 on loopback interface only 4 years ago
Nicolas Favre-Felix bcf2168b88
Add Docker Content Trust example 4 years ago
Nicolas Favre-Felix 8f33c4b298
Publish Docker Content Trust public key 4 years ago
Nicolas Favre-Felix 09f0ccc355
README: Add AWS ECR links, clean up Markdown
* Add links to new images on AWS ECR
* Clean up Markdown:
  * Change all <pre>...</pre> to ``` blocks
  * Add syntax info on code blocks
  * Add `$` prefix in front of all commands that didn't have it
  * Heading tweak
4 years ago
Nicolas Favre-Felix 9c1f900332
Update libcrypto, as recommended by snyk
Fixes https://snyk.io/vuln/SNYK-ALPINE311-OPENSSL-587980
Even though webdis doesn't use TLS, some images could be built from the
webdis image and therefore use a vulnerable version of openssl. The fix
is in version 1.1.1g and Alpine currently has 1.1.1i.
After this change, snyk no longer report any know vulnerabilities in the
Docker image.
4 years ago
Nicolas Favre-Felix 9f4a2093a6
Dockerfile updates
* Bump alpine version from 3.11.3 to 3.12.3
* Use `LABEL` instead of `MAINTAINER` which is deprecated
4 years ago
Nicolas Favre-Felix aafd53da0b
README fixes
* Make sure all external links use HTTPS
* Add missing dots in the list of supported formats/content-types
* Remove extra spaces
4 years ago
Nicolas Favre-Felix 42c11451b8
Use more common .md suffix for README 4 years ago
Nicolas Favre-Felix 955268a92d
Simplify Docker commands in README 4 years ago
Nicolas Favre-Felix 7e1c344259
Version bump after release 4 years ago
Nicolas Favre-Felix 21586199da
Release 0.1.12
* Adds support for MsgPackC on macOS
* Tests now pass with with python-msgpack (#150)
4 years ago
Nicolas Favre-Felix 1589b77da9
Clean up empty indented lines 4 years ago
Nicolas Favre-Felix c38e80a860
Wording 4 years ago
Nicolas Favre-Felix fa0b0f140f
README fix: s/OS X/macOS 4 years ago
Jessie Murray b3868d81d8 CodeQL: apply recommendations
* Use `localtime_r` instead of `localtime`
* Use correct argument type in callback to `msgpack_packer_new`
* Address FIXME in conf.c
* Remove redundant check in websocket.c
4 years ago
Nicolas Favre-Felix f9890be2c7
Remove CodeQL until I can figure out how to run it locally 4 years ago
Nicolas Favre-Felix 6e9b37a1c2
Remove build step from CodeQL analysis 4 years ago
Nicolas Favre-Felix 842c20fd08
Change CodeQL language to `cpp` (from `c`), use custom build step 4 years ago
Nicolas Favre-Felix 9460b93eec
Add GitHub workflow for CodeQL analysis 4 years ago
Nicolas Favre-Felix a675b2c0c2
Check for MsgPackC on macOS 4 years ago
Andrii Senkovych 2496fb2515
Pass tests with python-msgpack >= 0.3
Current test suite pass with python-msgpack v0.2 but fails with python-msgpack
v0.3 and later due to changes in the library. Modern distributions ship
python-msgpack > 0.3 for very long time ago.
4 years ago
Nicolas Favre-Felix c4ca659c4c Version bump after release 4 years ago
Nicolas Favre-Felix ceec7748dd Release 0.1.11 4 years ago
Nicolas Favre-Felix a41bd55105 Update Dockerfile to no longer require the latest tag
The Dockerfile used to refer to the latest published tag for Webdis.
This meant updating the file every time a new release was published.
This change uses the GitHub API to find the latest tag before
downloading and building the corresponding release.
4 years ago
Nicolas Favre-Felix 64d545cd64 Formatting fixes and object key changes for nested arrays
Formatting changes:
* Added `{}` after each single-line `if` (see "goto fail" bug).
* Added spaces around operators

Object key changes: reviewed the docs and selected more appropriate
names for various object keys.
4 years ago
majklik 106ae2433a
Few typos 4 years ago
majklik 69b1248626
JSON nested arrays
Add support for nested arrays and some commands replies areconverted into MAPs.
4 years ago
Nicolas Favre-Felix 3a39be4a2d Version bump after release 4 years ago
Nicolas Favre-Felix 77776e0eaa Release 0.1.10 4 years ago
Jessie Murray 1872facb48 Support environment variables in the config
* Adds support for environment variables in webdis.json
* Values starting with a `$` and in all caps are interpreted as
environment variables
4 years ago
Nicolas Favre-Felix f22a2953b9 Convert tests to Python3
Contribution from Sandro Tosi at https://github.com/nicolasff/webdis/issues/173
5 years ago