mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Tighten secret project-variable assertion (Greptile P1)
assertNotEquals('real-secret-value', $value) only rules out that exact
string — a partial/corrupted leak (e.g. 'real-secret', 'REAL-SECRET-VALUE',
hash) would still pass. The documented behavior is the destination stores
'' because the source SDK strips secret values from list responses, so
assertEmpty is the strictly tighter assertion.
This commit is contained in:
1 parent
469a163024
commit
02a09aa5e7
1 file changed
+1
-1
@@ -2707,7 +2707,7 @@ trait MigrationsBase
|
||||
$this->assertEquals($secretKey, $foundSecret['key']);
|
||||
// Secret variables: source SDK never returned the real value, so the destination
|
||||
// also stores empty. The original 'real-secret-value' must not have leaked.
|
||||
$this->assertNotEquals('real-secret-value', $foundSecret['value']);
|
||||
$this->assertEmpty($foundSecret['value']);
|
||||
$this->assertTrue($foundSecret['secret']);
|
||||
|
||||
// Cleanup on destination
|
||||
|
||||
Reference in new issue
Block a user