Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions webapp/tests/E2E/Controller/ControllerRolesTraversalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,12 @@ public function visitWithNoContest(string $url, bool $dropdown): void
try {
self::assertSelectorExists('a#navbarDropdownContests:contains("no contest")', "Failed at: " . $url);
} catch (\Exception $e) {
$gitlabArtifacts = getenv('GITLABARTIFACTS');
if ($gitlabArtifacts != '') {
$fileHandler = fopen(sprintf("%s/%s", $gitlabArtifacts, str_replace('/', '_s_', $url)), 'w');
fwrite($fileHandler, $response->getContent());
if (getenv('CI')) { // We're running in GHA.
$ciArtifacts = getenv('ARTIFACTS');
if ($ciArtifacts != '') {
$fileHandler = fopen(sprintf("%s/%s", $ciArtifacts, str_replace('/', '_s_', $url)), 'w');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is a perfect sanitizer, but at first glance it sounds safe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked for years and it's only for debugging in CI. In case it breaks we can easily fix it with the new insights.

fwrite($fileHandler, $response->getContent());
}
}
throw $e;
}
Expand Down
Loading