Uploaded image for project: 'Couchbase PHP client library'
  1. Couchbase PHP client library
  2. PCBC-218

cas() operation does not check if the cas contains illegal characters.

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.4
    • Component/s: None
    • Security Level: Public
    • Labels:
      None

      Description

      $cb = new \Couchbase('127.0.0.1', '', '', 'default', true);

      $cas = $cb->set('foo', 'bar', 0, null);
      var_dump($cb->get('foo'));

      var_dump($cb->cas($cas, 'foo', 'baz', 0));
      var_dump($cb->get('foo'));

      var_dump($cb->cas($cas, 'foo', 'bad', 0));
      var_dump($cb->get('foo'));

      var_dump($cb->cas('This is an invalid CAS', 'foo', 'bar', 0));
      var_dump($cb->get('foo'));

      RESULTS OF RUNNING:
      php test.php
      string(3) "bar"
      bool(true)
      string(3) "baz"
      bool(false)
      string(3) "baz"
      bool(true)
      string(3) "bar"

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        trond Trond Norbye created issue -
        Show
        trond Trond Norbye added a comment - http://review.couchbase.org/#/c/25481/
        trond Trond Norbye made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.1.4 [ 10464 ]
        Resolution Fixed [ 1 ]
        trond Trond Norbye made changes -
        Assignee Matt Ingenthron [ ingenthr ] Trond Norbye [ trond ]
        brett19 Brett Lawson made changes -
        Workflow jira [ 26476 ] Couchbase SDK Workflow [ 44421 ]

          People

          • Assignee:
            trond Trond Norbye
            Reporter:
            trond Trond Norbye
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes