fix: validate url for Dashboard Apps [CW-2979] (#8736)
This commit is contained in:
@@ -33,9 +33,12 @@ class DashboardApp < ApplicationRecord
|
||||
'required' => %w[url type],
|
||||
'properties' => {
|
||||
'type' => { 'enum': ['frame'] },
|
||||
'url' => { :type => 'string', 'format' => 'uri' }
|
||||
'url' => { '$ref' => '#/definitions/saneUrl' }
|
||||
}
|
||||
},
|
||||
'definitions' => {
|
||||
'saneUrl' => { 'format' => 'uri', 'pattern' => '^https?://' }
|
||||
},
|
||||
'additionalProperties' => false,
|
||||
'minItems' => 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user