Do not accept port bindings on update route

This commit is contained in:
Johannes Zellner
2017-10-23 22:06:28 +02:00
parent 56534b9647
commit 2971910ccf
2 changed files with 1 additions and 10 deletions
-8
View File
@@ -639,14 +639,6 @@ function update(appId, data, auditSource, callback) {
newConfig.manifest = manifest;
// TODO: disallow portBindings when an app updates and let ports simply be disabled. the new ports
// might conflict when the update is actually carried out as we do not 'reserve' them in the db
if ('portBindings' in data) {
newConfig.portBindings = data.portBindings;
error = validatePortBindings(data.portBindings, newConfig.manifest.tcpPorts);
if (error) return callback(error);
}
if ('icon' in data) {
if (data.icon) {
if (!validator.isBase64(data.icon)) return callback(new AppsError(AppsError.BAD_FIELD, 'icon is not base64'));