Skip to content

Commit

Permalink
Fixed regexp in database connection (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Jul 22, 2024
1 parent 7ef9d8d commit e36a140
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/Controller/Server/DatabaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
*/
class DatabaseController
{
private const URL_PATTERN = '^([^:]+)://(([^:@]+)(:([^@]+))?@)?([^:/]+(:[0-9]+)?)/([^?]+)(\?.+)?$';
// double escaping is necessary for JavaScript validation
private const URL_PATTERN = '^([^:]+)://(([^:@]+)(:([^@]+))?@)?([^:\/]+(:[0-9]+)?)/([^?]+)(\\?.+)?$';

/**
* @var ContaoApi
Expand Down
2 changes: 1 addition & 1 deletion src/components/setup/DatabaseConnection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default {
...mapState('contao/backup', { backupRestored: 'restored', backupRestore: 'restore' }),
...mapState('server/database', { currentUrl: 'url', urlPattern: 'pattern', status: 'status' }),
...mapState('contao/backup', ['files']),
...mapGetters('contao/database', { hasDatabaseError: 'hasError' }),
...mapGetters('server/database', { hasDatabaseError: 'hasError' }),
...mapGetters('contao/backup', ['hasBackups']),
fileOptions () {
Expand Down

0 comments on commit e36a140

Please sign in to comment.