mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 03:39:26 +00:00
Remove leftover validation
This commit is contained in:
@@ -38,8 +38,6 @@ public class ChannelDirectoryService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChannelDirectoryService.class);
|
||||
private static final Pattern SAFE_FILENAME = Pattern.compile("[^a-zA-Z0-9._ -]");
|
||||
private static final Pattern INIT_FUNCTION = Pattern.compile("\\bfunction\\s+init\\b");
|
||||
private static final Pattern TICK_FUNCTION = Pattern.compile("\\bfunction\\s+tick\\b");
|
||||
private static final String DEFAULT_CODE_MEDIA_TYPE = "application/javascript";
|
||||
|
||||
private final ChannelRepository channelRepository;
|
||||
@@ -439,12 +437,6 @@ public class ChannelDirectoryService {
|
||||
if (source == null || source.isBlank()) {
|
||||
throw new ResponseStatusException(BAD_REQUEST, "Script source is required");
|
||||
}
|
||||
if (!INIT_FUNCTION.matcher(source).find()) {
|
||||
throw new ResponseStatusException(BAD_REQUEST, "Missing function: init");
|
||||
}
|
||||
if (!TICK_FUNCTION.matcher(source).find()) {
|
||||
throw new ResponseStatusException(BAD_REQUEST, "Missing function: tick");
|
||||
}
|
||||
}
|
||||
|
||||
private void enforceUploadLimit(long sizeBytes) {
|
||||
|
||||
Reference in New Issue
Block a user