Skip to content

User styles form accepts styles over the length limit #159

Description

@can3p

SettingsUserStyles.Validate (pkg/forms/form_user_styles.go) calls AddError("styles", ...) for a value over 10000 characters but still returns nil, so the form is saved anyway.

Repro: save the user styles form with 10001 characters of CSS. The error is recorded, but validation passes and the styles are stored.

Expected: validation fails and nothing is saved.

Pinned by the skipped test TestSettingsUserStyles_ValidateTooLongStylesFailsValidation (W2).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions