Skip to content
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions webapp/src/Service/SubmissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ public function submitSolution(

if (!empty($entryPoint) && !preg_match(self::FILENAME_REGEX, $entryPoint)) {
$message = sprintf("Entry point '%s' contains illegal characters.", $entryPoint);
if ($forceImportInvalid) {
if ($forceImportInvalid || $source === 'shadowing') {
$importError = $message;
} else {
return null;
Expand Down Expand Up @@ -610,7 +610,7 @@ public function submitSolution(
}
if (!preg_match(self::FILENAME_REGEX, $file->getClientOriginalName())) {
$message = sprintf("Illegal filename '%s'.", $file->getClientOriginalName());
if ($forceImportInvalid) {
if ($forceImportInvalid || $source === 'shadowing') {
$importError = $message;
} else {
return null;
Expand Down Expand Up @@ -647,7 +647,7 @@ public function submitSolution(

if ($totalSize > $sourceSize * 1024) {
$message = sprintf("Submission file(s) are larger than %d kB.", $sourceSize);
if ($forceImportInvalid) {
if ($forceImportInvalid || $source === 'shadowing') {
$importError = $message;
} else {
return null;
Expand Down
Loading