---
title: "Nótaí scaoilte Django 1.5.3"
version: 5.2
locale: ga
source: https://docs.djangoproject.com/ga/5.2/releases/1.5.3/
canonical: https://djangodocs.dev/ga/5.2/releases/1.5.3/
---
# Nótaí scaoilte Django 1.5.3

*10 Meán Fómhair, 2013*

Is é seo Django 1.5.3, an tríú eisiúint sa tsraith Django 1.5. Tugann sé aghaidh ar shaincheist slándála amháin agus tá gné roghnaithe ann freisin chun slándáil: mod: django.contrib.sessions a fheabhsú.

## Leochaileacht eolaire a thrasnú i gclib teimpléad `ssi`

I leaganacha roimhe seo de Django bhí sé in ann an socrú ALLOWED\_INCLUDE\_ROOTS\` a úsáidtear le haghaidh slándála leis an gclib teimpléad `ssi` a sheachaint trí chonair choibhneasta a shonrú a thosaíonn le ceann de na fréamhacha ceadaithe. Mar shampla, má tá ALLOWED\_INCLUDE\_ROOTS = (“/var/www”,) bheadh an méid seo a leanas indéanta:

```html+django
{% ssi "/var/www/../../etc/passwd" %}
```

Go praiticiúil ní fadhb an-choitianta í seo, mar go n-éilfeadh sé ar an údar teimpléid an comhad `ssi` a chur in athróg faoi rialú úsáideora, ach is féidir é i bprionsabal.

## Leochaileacht forghníomhaithe iargúlta cód a mhaolú in:mod: django.contrib.sessions

[`django.contrib.sessions`](/ga/5.2/topics/http/sessions/#module-django.contrib.sessions) currently uses [`pickle`](https://docs.python.org/3/library/pickle.html#module-pickle) to serialize
session data before storing it in the backend. If you're using the [signed
cookie session backend](/ga/5.2/topics/http/sessions/#cookie-session-backend) and [`SECRET_KEY`](/ga/5.2/ref/settings/#std-setting-SECRET_KEY) is
known by an attacker (there isn't an inherent vulnerability in Django that
would cause it to leak), the attacker could insert a string into their session
which, when unpickled, executes arbitrary code on the server. The technique for
doing so is simple and easily available on the internet. Although the cookie
session storage signs the cookie-stored data to prevent tampering, a
[`SECRET_KEY`](/ga/5.2/ref/settings/#std-setting-SECRET_KEY) leak immediately escalates to a remote code execution
vulnerability.

Is féidir an t-ionsaí seo a mhaolú trí shraitheadh sonraí seisiúin ag baint úsáide as JSON seachas: mod: pickle. Chun é seo a éascú, tugann Django 1.5.3 suíomh nua isteach, :setting: SESSION\_SERIALIZER, chun an fhormáid sraitheach seisiúin a shaincheapadh. Maidir le comhoiriúnacht ar ais, réamhshocraíonn an socrú seo le húsáid: mod: pickle. Cé nach dtacaíonn sraith JSON le gach réad Python cosúil:mod: pickle a dhéanann, molaimid go mór aistriú chuig luachanna sraith JSON. Chomh maith leis sin, toisc go dteastaíonn eochracha teaghrán ag JSON, is dócha go mbeidh fadhbanna ort má tá eochracha neamh-sreang á úsáid agat i request.session \`. Féach an doiciméadach:ref: session\_serialization le haghaidh tuilleadh sonraí.
