diff --git a/plinth/notification.py b/plinth/notification.py index 89140b86e..26c9c5858 100644 --- a/plinth/notification.py +++ b/plinth/notification.py @@ -70,7 +70,9 @@ class Notification(models.StoredNotification): following fields are present in the model: 'id' is a unique string identifier for the notification and acts as the - primary key for the stored database table. + primary key for the stored database table. Only the following chars are + currently allowed: A-Z, a-z, 0-9, - and =. If other chars must be used, it + is recommended to use base32 encoding. 'app_id' is the unique ID of the app showing the notification. @@ -154,6 +156,7 @@ class Notification(models.StoredNotification): been dismissed by the user. """ + class Meta: # pylint: disable=too-few-public-methods """Meta properties of the Notification model.""" proxy = True diff --git a/plinth/urls.py b/plinth/urls.py index 8d69881ed..5317ef32c 100644 --- a/plinth/urls.py +++ b/plinth/urls.py @@ -32,6 +32,6 @@ urlpatterns = [ url(r'locked/$', public(CaptchaLoginView.as_view()), name='locked_out'), # Notifications - url(r'^notification/(?P[a-z0-9-]+)/dismiss/$', + url(r'^notification/(?P[A-Za-z0-9-=]+)/dismiss/$', views.notification_dismiss, name='notification_dismiss') ]