[PCBC-218] cas() operation does not check if the cas contains illegal characters. Created: 04/Apr/13  Updated: 05/Apr/13  Resolved: 05/Apr/13

Status: Resolved
Project: Couchbase PHP client library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.4
Security Level: Public

Type: Task Priority: Major
Reporter: Trond Norbye Assignee: Trond Norbye
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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"

 Comments   
Comment by Trond Norbye [ 04/Apr/13 ]
http://review.couchbase.org/#/c/25481/
Generated at Wed Aug 20 09:48:16 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.