diff --git a/files/helpers/get.py b/files/helpers/get.py index efa558850..84d20cf3a 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -370,10 +370,16 @@ def get_profile_picture(identifier:Union[int, str]) -> str: return x.profile_url if x else 'not_found' def get_error(): - return request.values.get("error") + if request.referrer and request.referrer.split('?')[0] == request.base_url: + return request.values.get("error") + else: + return None def get_msg(): - return request.values.get("msg") + if request.referrer and request.referrer.split('?')[0] == request.base_url: + return request.values.get("msg") + else: + return None def get_page(): try: return max(int(request.values.get("page", 1)), 1) diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index e22b99c87..363634247 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -190,7 +190,6 @@ {% endmacro %} {% macro alert(msg, error=false) %} -{% if request.referrer and request.referrer.split('?')[0] == request.base_url %}