1. 03 Aug, 2016 1 commit
    • antirez's avatar
      Security: Cross Protocol Scripting protection. · a81a92ca
      antirez authored
      This is an attempt at mitigating problems due to cross protocol
      scripting, an attack targeting services using line oriented protocols
      like Redis that can accept HTTP requests as valid protocol, by
      discarding the invalid parts and accepting the payloads sent, for
      example, via a POST request.
      
      For this to be effective, when we detect POST and Host: and terminate
      the connection asynchronously, the networking code was modified in order
      to never process further input. It was later verified that in a
      pipelined request containing a POST command, the successive commands are
      not executed.
      a81a92ca
  2. 27 Jul, 2016 1 commit
    • antirez's avatar
      Ability of slave to announce arbitrary ip/port to master. · 55385f99
      antirez authored
      This feature is useful, especially in deployments using Sentinel in
      order to setup Redis HA, where the slave is executed with NAT or port
      forwarding, so that the auto-detected port/ip addresses, as listed in
      the "INFO replication" output of the master, or as provided by the
      "ROLE" command, don't match the real addresses at which the slave is
      reachable for connections.
      55385f99
  3. 21 Jul, 2016 1 commit
    • antirez's avatar
      Avoid simultaneous RDB and AOF child process. · 0a628e51
      antirez authored
      This patch, written in collaboration with Oran Agra (@oranagra) is a companion
      to 780a8b1d. Together the two patches should avoid that the AOF and RDB saving
      processes can be spawned at the same time. Previously conditions that
      could lead to two saving processes at the same time were:
      
      1. When AOF is enabled via CONFIG SET and an RDB saving process is
         already active.
      
      2. When the SYNC command decides to start an RDB saving process ASAP in
         order to serve a new slave that cannot partially resynchronize (but
         only if we have a disk target for replication, for diskless
         replication there is not such a problem).
      
      Condition "1" is not very severe but "2" can happen often and is
      definitely good at degrading Redis performances in an unexpected way.
      
      The two commits have the effect of always spawning RDB savings for
      replication in replicationCron() instead of attempting to start an RDB
      save synchronously. Moreover when a BGSAVE or AOF rewrite must be
      performed, they are instead just postponed using flags that will try to
      perform such operations ASAP.
      
      Finally the BGSAVE command was modified in order to accept a SCHEDULE
      option so that if an AOF rewrite is in progress, when this option is
      given, the command no longer returns an error, but instead schedules an
      RDB rewrite operation for when it will be possible to start it.
      0a628e51
  4. 20 Jul, 2016 2 commits
  5. 15 Jul, 2016 1 commit
  6. 13 Jul, 2016 1 commit
    • antirez's avatar
      LRU: Make cross-database choices for eviction. · e423f76e
      antirez authored
      The LRU eviction code used to make local choices: for each DB visited it
      selected the best key to evict. This was repeated for each DB. However
      this means that there could be DBs with very frequently accessed keys
      that are targeted by the LRU algorithm while there were other DBs with
      many better candidates to expire.
      
      This commit attempts to fix this problem for the LRU policy. However the
      TTL policy is still not fixed by this commit. The TTL policy will be
      fixed in a successive commit.
      
      This is an initial (partial because of TTL policy) fix for issue #2647.
      e423f76e
  7. 12 Jul, 2016 2 commits
  8. 06 Jul, 2016 1 commit
  9. 04 Jul, 2016 1 commit
  10. 01 Jul, 2016 1 commit
  11. 22 Jun, 2016 1 commit
  12. 20 Jun, 2016 1 commit
  13. 14 Jun, 2016 1 commit
  14. 13 Jun, 2016 2 commits
  15. 05 Jun, 2016 2 commits
  16. 03 Jun, 2016 1 commit
  17. 01 Jun, 2016 1 commit
  18. 18 May, 2016 1 commit
  19. 10 May, 2016 9 commits
  20. 09 May, 2016 1 commit
  21. 25 Apr, 2016 1 commit
  22. 22 Apr, 2016 1 commit
    • therealbill's avatar
      fix for #3187 · 14086a46
      therealbill authored
      I've renamed maxmemoryToString to evictPolicyToString since that is
      more accurate (and easier to mentally connect with the correct data), as
      well as updated the function to user server.maxmemory_policy rather than
      server.maxmemory. Now with a default config it is actually returning
      the correct policy rather than volatile-lru.
      14086a46
  23. 15 Apr, 2016 2 commits
  24. 14 Apr, 2016 1 commit
  25. 26 Feb, 2016 1 commit
    • antirez's avatar
      BITFIELD command initial implementation. · 70af626d
      antirez authored
      The new bitfield command is an extension to the Redis bit operations,
      where not just single bit operations are performed, but the array of
      bits composing a string, can be addressed at random, not aligned
      offsets, with any width unsigned and signed integers like u8, s5, u10
      (up to 64 bit signed integers and 63 bit unsigned integers).
      
      The BITFIELD command supports subcommands that can SET, GET, or INCRBY
      those arbitrary bit counters, with multiple overflow semantics.
      
      Trivial and credits:
      
      A similar command was imagined a few times in the past, but for
      some reason looked a bit far fetched or not well specified.
      Finally the command was proposed again in a clear form by
      Yoav Steinberg from Redis Labs, that proposed a set of commands on
      arbitrary sized integers stored at bit offsets.
      
      Starting from this proposal I wrote an initial specification of a single
      command with sub-commands similar to what Yoav envisioned, using short
      names for types definitions, and adding control on the overflow.
      
      This commit is the resulting implementation.
      
      Examples:
      
          BITFIELD mykey OVERFLOW wrap INCRBY i2 10 -1 GET i2 10
      70af626d
  26. 18 Feb, 2016 2 commits