Skip to content

Commit

Permalink
Merge pull request #362 from AmpersandTarski/feature/361-Username-san…
Browse files Browse the repository at this point in the history
…itization

#361 added default prefix to username to prevent errors when only usi…
  • Loading branch information
FranSlot committed Mar 28, 2024
2 parents bd712a1 + 7a823f5 commit 350999d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RAP4/customizations/bootstrap/files/ExecEngineFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,14 @@
$zipContentForCommandline = base64_encode($zipContent);
$mainAldForCommandLine = base64_encode("main.adl");

//sanitize the username for usage later
$pattern = '/[\W+]/';

$userName=strtolower($userName);
$userName = preg_replace($pattern, '-', $userName);

$userName = 'st-' . $userName;

$deployment = getenv('RAP_DEPLOYMENT');
if ($deployment == 'Kubernetes') {
/** Deployed on Kubernetes Cluster
Expand Down

0 comments on commit 350999d

Please sign in to comment.