Prevent invalid service tag names, ref #443

This commit is contained in:
Dane Everitt 2017-05-23 21:59:47 -05:00
parent 7460b5fdd2
commit 8144535b82
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 3 additions and 2 deletions

View file

@ -9,6 +9,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* Fixes 'Remember Me' checkbox being ignored when using 2FA on an account.
* API now returns a useful error displaying what went wrong rather than an obscure 'An Error was Encountered' message when API issues arise.
* Fixes bug preventing the creation of new files in the file manager due to a missing JS dependency on page load.
* Prevent using a service option tag that contains special chaacters that are not valid. Now only allows alpha-numeric, no spaces or underscores.
### Changed
* Renamed session cookies from `laravel_session` to `pterodactyl_session`.

View file

@ -47,7 +47,7 @@ class OptionRepository
'service_id' => 'required|numeric|exists:services,id',
'name' => 'required|string|max:255',
'description' => 'required|string',
'tag' => 'required|string|max:255|unique:service_options,tag',
'tag' => 'required|alpha_num|max:60|unique:service_options,tag',
'docker_image' => 'sometimes|string|max:255',
'startup' => 'sometimes|nullable|string',
'config_from' => 'sometimes|required|numeric|exists:service_options,id',

View file

@ -66,7 +66,7 @@
<div class="form-group">
<label for="pTag" class="form-label">Option Tag</label>
<input type="text" id="pTag" name="tag" value="{{ old('tag') }}" class="form-control" />
<p class="text-muted small">This should be a unique identifer for this service option that is not used for any other service options.</p>
<p class="text-muted small">This should be a unique identifer for this service option that is not used for any other service options. Must be alpha-numeric and no more than 60 characters in length.</p>
</div>
<div class="form-group">
<label for="pDockerImage" class="form-label">Docker Image</label>