Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-6758

Redis protocol fails for lower case commands

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • RHDG 8.4.5 GA
    • Server
    • None
    • False
    • None
    • False
    • Release Notes
    • RedisInsight will be implemented for RHDG8.5
    • Moderate
    • Customer Facing

      RHDG's Redis protocol implementation implements its own case insensitive string comparison instead of using standard libraries to do so.  And does it wrong.

      server/resp/src/main/java/org/infinispan/server/resp/RespCommand.java

                     if (upperByte == targetByte || upperByte + 22 == targetByte) {

      Lower case ASCII letters are 32 higher than upper case, not 22.

      So if a Redis client sends upper case commands it will work, but if it sends lower case commands it will fail to match the command, ending up with a TRACE log like:
      [org.infinispan.server.resp.RespDecoder] Received command: null with arguments []
       

              Unassigned Unassigned
              rhn-support-dereed Dennis Reed
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: