Skip to content

Commit

Permalink
Fix language switcher CSRF error when interacting before login #11528
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Oct 7, 2024
1 parent 40590c8 commit 87ec2bf
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions arches/app/templates/base-manager.htm
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ <h1 class="page-header text-overflow ep-graph-title">
{% endif %}

{% if show_language_swtich %}
{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
<li aria-label="{% trans 'Choose your language' %}">
<div class="lang-switch ep-tools ep-tools-right" style="max-width: none;" data-bind='component: {
Expand Down
1 change: 1 addition & 0 deletions arches/app/templates/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ <h1>{% blocktrans %}Arches | {{version}}{% endblocktrans %}</h1>
</li>
{% endif %}
{% if show_language_swtich %}
{% csrf_token %}
<li>
{% get_current_language as LANGUAGE_CODE %}
<div class="lang-switch" style="max-width: none;" data-bind='component: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ <h1>{% blocktrans %}Arches | {{version}}{% endblocktrans %}</h1>
</li>
{% endif %}
{% if show_language_swtich %}
{% csrf_token %}
<li>
{% get_current_language as LANGUAGE_CODE %}
<div class="lang-switch" style="max-width: none;" data-bind='component: {
Expand Down
4 changes: 2 additions & 2 deletions releases/7.6.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Arches 7.6.1 Release Notes

### Bug Fixes and Enhancements

- Fixes bug causing the map layer manager to fail if a system uses DEFAULT_PERMISSIONS setting #[115522](https://github.com/archesproject/arches/issues/11522)
- Fixes bug causing the map layer manager to fail if a system uses DEFAULT_PERMISSIONS setting #[11522](https://github.com/archesproject/arches/issues/11522)

### Dependency changes:
```
Expand All @@ -25,7 +25,7 @@ JavaScript:
pip install --upgrade arches==7.6.1
```

3. If you are running Arches on Apache, be restart your server:
3. If you are running Arches on Apache, restart your server:
```
sudo service apache2 reload
```
31 changes: 31 additions & 0 deletions releases/7.6.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Arches 7.6.2 Release Notes
--------------------------

### Bug Fixes and Enhancements

- Fix language switcher CSRF error when interacting before login #[11528](https://github.com/archesproject/arches/issues/11528)

### Dependency changes:
```
Python:
Upgraded:
None
JavaScript:
Upgraded:
none
```

### Upgrading Arches

1. Upgrade to version 7.6.0 before proceeding by following the upgrade process in the [Version 7.6.0 release notes](https://github.com/archesproject/arches/blob/dev/7.6.x/releases/7.6.0.md)

2. Upgrade to Arches 7.6.2
```
pip install --upgrade arches==7.6.2
```

3. If you are running Arches on Apache, restart your server:
```
sudo service apache2 reload
```

0 comments on commit 87ec2bf

Please sign in to comment.