Skip to content

Commit

Permalink
[Fixes #8425] Space in sitename not escaped in invitation mail body (#…
Browse files Browse the repository at this point in the history
…8538) (#8539)

Co-authored-by: Alessio Fabiani <[email protected]>
  • Loading branch information
github-actions[bot] and Alessio Fabiani authored Dec 22, 2021
1 parent 1d0f89e commit 7ddf753
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name }}!
{% load account %}{% user_display user as user_display %}{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name|urlencode }}!

You're receiving this e-mail because user {{ user_display }} has given yours as an e-mail address to connect their account.

To confirm this is correct, go to {{ activate_url }}
{% endblocktrans %}{% endautoescape %}
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you from {{ site_name }}!
{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you from {{ site_name|urlencode }}!
{{ site_domain }}{% endblocktrans %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% load i18n %}{% autoescape off%}{% blocktrans with site_name=current_site.name %}Please confirm email address for {{ site_name }}{% endblocktrans %}{% endautoescape %}
{% load i18n %}{% autoescape off%}{% blocktrans with site_name=current_site.name %}Please confirm email address for {{ site_name|urlencode }}{% endblocktrans %}{% endautoescape %}
2 changes: 1 addition & 1 deletion geonode/templates/account/email/invite_user.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% load i18n %}{% blocktrans with site_name=current_site.name %}You have been invited to sign up at {{ site_name }}.{% endblocktrans %}
{% load i18n %}{% blocktrans with site_name=current_site.name %}You have been invited to sign up at {{ site_name|urlencode }}.{% endblocktrans %}

{{ signup_url }}
2 changes: 1 addition & 1 deletion geonode/templates/account/email/invite_user_subject.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% load i18n %}{% blocktrans with site_name=current_site.name %}Create an account on {{ site_name }}{% endblocktrans %}
{% load i18n %}{% blocktrans with site_name=current_site.name %}Create an account on {{ site_name|urlencode }}{% endblocktrans %}
4 changes: 2 additions & 2 deletions geonode/templates/account/email/password_reset_key.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load i18n %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name }}!
{% load i18n %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Hello from {{ site_name|urlencode }}!

You're receiving this e-mail because you or someone else has requested a password for your user account.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}
Expand All @@ -7,5 +7,5 @@ It can be safely ignored if you did not request a password reset. Click the link

{% if username %}{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}

{% endif %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
{% endif %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name|urlencode }}!
{{ site_domain }}{% endblocktrans %}
6 changes: 3 additions & 3 deletions geonode/templates/invitations/email/email_invite_message.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% load i18n %}
<p>{% blocktrans %}Dear Sir/Madam,{% endblocktrans %}</p>
<p><strong>{{ inviter_name }}</strong> {% blocktrans %}is inviting you to join ({{ site_name }}).{% endblocktrans %}</p>
<p><strong>{{ inviter_name }}</strong> {% blocktrans %}is inviting you to join ({{ site_name|urlencode }}).{% endblocktrans %}</p>
<p>
{% blocktrans %}To do so, please register at <a href="{{ invite_url }}">{{ site_name }} Registration</a>.{% endblocktrans %}
{% blocktrans %}To do so, please register at <a href="{{ invite_url }}">{{ site_name|urlencode }} Registration</a>.{% endblocktrans %}
</p>
<p>
{% blocktrans %}Once you receive the confirmation that your account is activated, you can notify{% endblocktrans %} <strong>{{ inviter_name }}</strong> {% blocktrans %}that you wish to join her/his group(s) through{% endblocktrans %} <a href="{{ SITEURL }}{% url 'message_create' inviter_id %}?subject=Request%20to%20join%20your%20group&content=Dear%20group%20manager%2C%0A%0AI%20am%20now%20a%20member%20of%20{{ site_name }}%2C%20and%20I%20would%20like%20to%20join%20the%20group%20that%20you%20are%20managing.%0APlease%20add%20me%20to%20your%20group.%0A%0AThank%20you.">{% blocktrans %}this link{% endblocktrans %}</a>.
{% blocktrans %}Once you receive the confirmation that your account is activated, you can notify{% endblocktrans %} <strong>{{ inviter_name }}</strong> {% blocktrans %}that you wish to join her/his group(s) through{% endblocktrans %} <a href="{{ SITEURL }}{% url 'message_create' inviter_id %}?subject=Request%20to%20join%20your%20group&content=Dear%20group%20manager%2C%0A%0AI%20am%20now%20a%20member%20of%20{{ site_name|urlencode }}%2C%20and%20I%20would%20like%20to%20join%20the%20group%20that%20you%20are%20managing.%0APlease%20add%20me%20to%20your%20group.%0A%0AThank%20you.">{% blocktrans %}this link{% endblocktrans %}</a>.
</p>
<p>{% blocktrans %}<strong>{{ inviter_name }}</strong> is a member of the following group(s):{% endblocktrans %}</p>
<ul>
Expand Down
4 changes: 2 additions & 2 deletions geonode/templates/invitations/email/email_invite_message.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{% autoescape off %}
{% blocktrans %}Dear Sir/Madam,{% endblocktrans %}

{{ inviter_name }} {% blocktrans %}is inviting you to join{% endblocktrans %} ({{ site_name }}).
{{ inviter_name }} {% blocktrans %}is inviting you to join{% endblocktrans %} ({{ site_name|urlencode }}).

{% blocktrans %}To do so, please register at{% endblocktrans %} {{ invite_url }} .

{% blocktrans %}Once you receive the confirmation that your account is activated, you can notify{% endblocktrans %} {{ inviter_name }} {% blocktrans %}that you wish to join her/his group(s) through this link{% endblocktrans %}

{{ SITEURL }}{% url 'message_create' inviter_id %}?subject=Request%20to%20join%20your%20group&content=Dear%20group%20manager%2C%0A%0AI%20am%20now%20a%20member%20of%20{{ site_name }}%2C%20and%20I%20would%20like%20to%20join%20the%20group%20that%20you%20are%20managing.%0APlease%20add%20me%20to%20your%20group.%0A%0AThank%20you.
{{ SITEURL }}{% url 'message_create' inviter_id %}?subject=Request%20to%20join%20your%20group&content=Dear%20group%20manager%2C%0A%0AI%20am%20now%20a%20member%20of%20{{ site_name|urlencode }}%2C%20and%20I%20would%20like%20to%20join%20the%20group%20that%20you%20are%20managing.%0APlease%20add%20me%20to%20your%20group.%0A%0AThank%20you.

{{ inviter_name }} {% blocktrans %}is a member of the following group(s){% endblocktrans %}:
{% for group in groups %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load i18n %}
{% autoescape off %}
{{ inviter_name }} is inviting you to join {{ site_name }}
{{ inviter_name }} is inviting you to join {{ site_name|urlencode }}
{% endautoescape %}

0 comments on commit 7ddf753

Please sign in to comment.