Skip to content

Commit

Permalink
relativePathRow: Fix regular expression for validation
Browse files Browse the repository at this point in the history
flatpak-override --persist option can take basically any
string, so there isn't much to validate here, except one
string that can break the config files, e.g. linebreaks.

Closes #558
  • Loading branch information
tchx84 committed Aug 30, 2023
1 parent 9f041ec commit efbf39f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/relativePathRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var FlatsealRelativePathRow = GObject.registerClass({
}

_setup() {
this._expression = new RegExp(/.*\S.*/);
this._expression = new RegExp(/^[^\n]*$/);

this._entry.connect('notify::text', this._changed.bind(this));
this._button.connect('clicked', this._remove.bind(this));
Expand Down

0 comments on commit efbf39f

Please sign in to comment.