diff options
author | Harald Musum <musum@yahooinc.com> | 2022-04-28 15:01:42 +0200 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2022-04-28 15:01:42 +0200 |
commit | d5a2caa23b848a18352127b502f4817aa9bfc45d (patch) | |
tree | 1cd48b848b802bc3590d681a83c9b77cf33b7c86 /configserver/src/main | |
parent | 04add1191a91616173e3a84a9e69a9215a108d6d (diff) |
Validate file extension for app files, part 4
* Allow .gitignore files everywhere and .profile files in schemas/ directory
* Move exception handling and logging to config server code
Diffstat (limited to 'configserver/src/main')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java index 120a75bdd72..96a81d04c81 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/session/SessionRepository.java @@ -678,7 +678,13 @@ public class SessionRepository { DeployData deployData = new DeployData(user, userDir.getAbsolutePath(), applicationId, deployTimestamp, internalRedeploy, sessionId, currentlyActiveSessionId.orElse(nonExistingActiveSessionId)); FilesApplicationPackage app = FilesApplicationPackage.fromFileWithDeployData(configApplicationDir, deployData); - app.validateFileExtensions(failDeploymentForFilesWithUnknownExtension.value()); + try { + app.validateFileExtensions(); + } catch (IllegalArgumentException e) { + if (failDeploymentForFilesWithUnknownExtension.value()) + throw e; + log.log(Level.INFO, e.getMessage()); + } return app; } |