Skip to content

Commit 78b09f6

Browse files
authored
Merge pull request #1501 from proditis/master
Minor fixes from tests
2 parents 0d2377d + fcf85f9 commit 78b09f6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/commands/CronController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function actionInstances($pfonly = false)
264264
// Check existing environment variables for ETSCTF_FLAG keys
265265
foreach ($dc->targetVariables as $key => $tv) {
266266
// Replace the old key with the encrypted treasure
267-
if ($tv->key == 'ETSCTF_FLAG') {
267+
if ($tv->key == 'ETSCTF_FLAG' && array_key_exists('env',$encryptedTreasures['fs'])) {
268268
$tv->val = str_replace($encryptedTreasures['fs']['env'][0]['src'], $encryptedTreasures['fs']['env'][0]['dest'], $tv->val);
269269
break;
270270
}

backend/modules/infrastructure/models/TargetInstance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getEncryptedTreasures()
123123
->where(['target_id' => $this->target_id]);
124124
$treasures = [];
125125
foreach ($query->all() as $t) {
126-
if ($t->category == 'env' && $t->location == 'environment') {
126+
if ($t->category == 'env' && ($t->location == 'environment' || $t->location == '')) {
127127
$treasures['env'][] = ["src" => $t->code, 'dest' => $t->encrypted_code];
128128
} else if (str_contains($t->location, $t->code)) {
129129
$treasures['mv'][] = ["src" => $t->location, 'dest' => str_replace($t->code, $t->encrypted_code, $t->location)];

contrib/multi-ports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def main():
4747
# Process full lines from the buffer
4848
while '\n' in buffers[sock]:
4949
line, buffers[sock] = buffers[sock].split('\n', 1) # Split at the first newline
50-
eprint(f"{line}")
50+
print(f"{line}")
5151
else:
5252
# Connection closed by the server
5353
eprint(f"Connection to {sock.getpeername()[0]}:{sock.getpeername()[1]} closed.")

0 commit comments

Comments
 (0)