Commit Graph

8403 Commits

Author SHA1 Message Date
Anssi Kääriäinen 207117ae73 [1.5.x] Fixed #20091 -- Oracle null promotion for empty strings
Backpatch of e17fa9e877
2013-03-26 15:05:37 +02:00
Russell Keith-Magee d35e621633 [1.5.x] Fixed #20048, #20060 -- Modified tests for contrib apps sensitive to custom User models.
Thanks to matiasb for the report of #20060 and the draft patch for #20048.

(cherry picked from commit 930af661ab)
2013-03-23 10:02:10 +08:00
Claude Paroz deec020bf5 [1.5.x] Fixed #20108 -- Fixed filepath_to_uri decoding error
This was a regression due to unicode_literals usage. Thanks Ivan
Virabyan for the report and the initial patch.
Backport of 164528acc8 from master.
2013-03-22 17:58:36 +01:00
Marc Tamlyn dd897e4eeb [1.5.x] Fixed #20094 - Be more careful when checking for Iterator
Python 2.6 has some different behaviour when checking
isinstance(foo, collections.Iterator).
Backport of 829dc3c5 from master.
2013-03-22 17:45:41 +01:00
Claude Paroz b91067d9aa [1.5.x] Revert "Fixed #19895 -- Made second iteration over invalid queryset raise an exception too"
This reverts commit d1e87eb3ba.
This commit was the cause of a memory leak. See ticket for more details.
Thanks Anssi Kääriäinen for identifying the source of the bug.
2013-03-20 10:43:14 +01:00
Aymeric Augustin 1c9bd69ff0 [1.5.x] Stopped using non-standard __globals__ and __code__ attributes.
Some alternative implementations don't have them.

Closes #19944.

Backport of 9d4a5b00f1 from master.
2013-03-17 16:05:55 +01:00
Aymeric Augustin 2757d492bb [1.5.x] Updated bundled version of six.
Backport of e11ccc76d3.
2013-03-17 16:05:30 +01:00
Florian Apolloner f96d2848c6 [1.5.x] Updated our six module to follow upstream changes.
This includes fixes for the java/jython detection and a new license header.

Thanks to Thomas Bartelmess for the report.

Backport of c5ce0e8a68 from master.
2013-03-17 16:05:19 +01:00
Claude Paroz 101ec4bf8a [1.5.x] Fixed #20036 -- Improved GEOS version string parsing
Thanks chikiro.spam at gmail.com for the report.
Backport of 747f7d254 from master.
2013-03-13 09:54:37 +01:00
Claude Paroz 327c98ff08 [1.5.x] Fixed #19933 -- Catched ValueError in get_system_username
Thanks lanre.hbs at gmail.com for the report.
2013-03-02 22:45:06 +01:00
Łukasz Langa bbe8205693 [py3] Always fed hashlib with bytes. 2013-02-27 10:03:33 +01:00
James Bennett b170c077cc [1.5.x] Correct final element of version tuple. 2013-02-26 13:28:38 -06:00
James Bennett e7f2c6f2d7 [1.5.x] Bump version numbers for Django 1.5 release. 2013-02-26 13:06:35 -06:00
Aymeric Augustin 702d39921c [1.5.x] Fixed #19634 -- Added proper __hash__ methods.
Classes overriding __eq__ need a __hash__ such that equal objects have
the same hash.

Thanks akaariai for the report and regebro for the patch.

Backport of e76147a from master.
2013-02-25 23:37:23 +01:00
Aymeric Augustin 33fc438952 [1.5.x] Fixed #18144 -- Restored compatibility with SHA1 hashes with empty salt.
Thanks dahool for the report and initial version of the patch.

Backport of 633d8de from master.
2013-02-25 20:04:26 +01:00
Claude Paroz 3fb98406dc [1.5.x] Updated translations 2013-02-25 14:27:14 +01:00
Simon Charette f8b41da431 [1.5.x] Fixed #19688 -- Allow model subclassing with a custom metaclass using six.with_metaclass
Backport of 6b03179e12 from master.

Although we're post RC 2, I'm backporting this because it's arguably a
major bug in a new feauture that will prevent several well-known
third-party apps from being ported to Python 3.
2013-02-24 17:45:48 +01:00
Grzegorz Nosek d1e87eb3ba [1.5.x] Fixed #19895 -- Made second iteration over invalid queryset raise an exception too
When iteration over a queryset raised an exception, the result cache
remained initialized with an empty list, so subsequent iterations returned
an empty list instead of raising an exception

Backport of 2cd0edaa47 from master.
2013-02-23 14:39:05 -06:00
Jannis Leidel f96dd05542 [1.5.X] Fixed #19850 -- Use configured staticfiles storage to find the URL of a static file in the admin. 2013-02-23 14:42:11 +01:00
Anssi Kääriäinen 251f345db6 [1.5.x] Fixed Oracle regression in last_executed_query() with unicode strings
The regression was likely caused by the fix in #19606 which adjusted
Oracle's unicode detection, though it seems this would have been an
issue in some configurations even before.

Backpatch of ce094e570e
2013-02-23 00:31:14 +02:00
Anssi Kääriäinen 8a99d718f7 [1.5.x] Fixed empty strings + to_field regression on Oracle
Querying the reverse side of nullable to_field relation, where both
sides can contain null values resulted in incorrect results. The reason
was not detecting '' as NULL.

Refs #17541, backpatch of 09fcb70c80.
2013-02-23 00:09:48 +02:00
Anssi Kääriäinen 96790fc022 [1.5.x] Made a couple of selenium tests wait for page loaded
The admin_widgets tests were issuing click() to the browser but
didn't wait for the effects of those clicks. This caused the resulting
request to be processed concurrently with the test case. When using
in-memory SQLite this caused weird failures.

Also added wait_page_loaded() to admin selenium tests for code
reuse.

Fixed #19856, backpatch of 50677b29af
2013-02-21 00:01:07 +02:00
Anssi Kääriäinen 8ad436636f [1.5.x] Fixed #19672 -- Error in negated Q() filtering
There was a variable overwrite error in negated join filtering. This
happened when add_filter() was adding the IS NULL condition to the
WHERE clause.

This is not a backport from master as there have been some other
refactorings which made this patch irrelevant.

The patch is from Ian Kelly.
2013-02-20 21:57:39 +02:00
Carl Meyer 8d4342f2c9 [1.5.x] Fixed #19857 -- Fixed broken docs link in project template. 2013-02-19 18:43:28 -07:00
James Bennett 18d920ea48 [1.5.x] Bump version numbers for security release. 2013-02-19 14:15:33 -06:00
Aymeric Augustin 3ef4bbf495 [1.5.x] Added a default limit to the maximum number of forms in a formset.
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 10:39:04 -07:00
Carl Meyer 0e46c7f7ac [1.5.x] Checked object permissions on admin history view.
This is a security fix. Disclosure and advisory coming shortly.

Patch by Russell Keith-Magee.
2013-02-19 10:39:04 -07:00
Carl Meyer 2d0c22e02d [1.5.x] Restricted the XML deserializer to prevent DoS attacks.
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 10:39:03 -07:00
Carl Meyer a7e33c5bf3 [1.5.x] Added a new required ALLOWED_HOSTS setting for HTTP host header validation.
This is a security fix; disclosure and advisory coming shortly.
2013-02-19 10:39:03 -07:00
Claude Paroz 41848b078a [1.5.x] Fixed #19833 -- Fixed import parameter encoding in get_runner
Thanks Danilo Bargen for the report.
Backport of 63236161 from master.
2013-02-16 13:32:03 +01:00
Claude Paroz 5a803ce10e [1.5.x] Fixed geos test to prevent random failure
Points in the test fixtures have 20 as max coordinate.
Backport of 87854b0bdf from master.
2013-02-15 20:15:31 +01:00
Claude Paroz 1b54c85a53 [1.5.x] Avoided unneeded assertion on Python 3
Fixes failure introduced in 02e5909f7a.
2013-02-15 16:11:53 +01:00
Claude Paroz 5921f15c11 [1.5.x] Fixed #19807 -- Sanitized getpass input in createsuperuser
Python 2 getpass on Windows doesn't accept unicode, even when
containing only ascii chars.
Thanks Semmel for the report and tests.
Backport of 02e5909f7a from master.
2013-02-15 15:51:17 +01:00
Julien Phalip 42e87c17f2 [1.5.x] Fixed #19829 -- Fixed index lookups for NumPy arrays in templates.
Backport of 7d5e35cdb4
2013-02-15 00:18:49 -08:00
Russell Keith-Magee bc6746ac30 [1.5.x] Fixed #19822 -- Added validation for uniqueness on USERNAME_FIELD on custom User models.
Thanks to Claude Peroz for the draft patch.

(cherry picked from commit f5e4a699ca)
2013-02-15 09:02:14 +08:00
Ramiro Morales 6f29147488 [1.5.x] Fixed #19729 -- Removed leftover refactoring helper variables.
Thanks chrismedrela for the report.

Refs #6262, 44b9076 and 4d94c0c.

826d9de00e from master.
2013-02-14 20:45:36 -03:00
Carl Meyer f83bec4847 [1.5.x] Fix admindocs on Python 3, where None cannot be sorted with strings.
This fixes two tests in admin_views which were failing on Python 3, but only if
the tests were run with docutils installed.
2013-02-12 17:12:44 -07:00
Anssi Kääriäinen 743263a105 [1.5.x] Removed try-except in django.db.close_connection()
The reason was that the except clause needed to remove a connection
from the django.db.connections dict, but other parts of Django do not
expect this to happen. In addition the except clause was silently
swallowing the exception messages.

Refs #19707, special thanks to Carl Meyer for pointing out that this
approach should be taken.
2013-02-13 00:22:10 +02:00
Anssi Kääriäinen 77f6eb2a60 [1.5.x] Made custom m2m fields without through easier to use
The change in f105fbe52b made through=None
m2m fields fail in cases where they worked before. It isn't possible to
create such fields using public APIs. The fix is trivial, so it seems
worth adding it.

This is not a backport from master. Master has gotten enough other
changes to related fields internal API that this fix alone isn't enough
to do any good.
2013-02-10 21:54:48 +02:00
Anssi Kääriäinen b18ad807e0 [1.5.x] Fixed #19720 -- Oracle ordering related delete regression
When a query had a complex where condition (a condition targeting more
than the base table) a subquery was used for deletion. However, the
query had default ordering from the model's meta and Oracle doesn't
work with ordered subqueries.

The regression was caused by fast-path deletion code introduced in
1cd6e04cd4 for fixing #18676.

Thanks to Dylan Klomparens for the report.

Backpatch of 8ef3235034
2013-02-10 19:58:22 +02:00
Anssi Kääriäinen d8e68f421e [1.5.x] Fixed #19638 -- Skipped tx support testing for some DBs
PostgreSQL and Oracle always support transactions, so the create table
and rollback test is non-necessary on those DBs.

Thanks to shai for report.

Backpatch of 0478780b8e
2013-02-10 19:08:15 +02:00
Anssi Kääriäinen 60186aa2e5 [1.5.x] Fixed #19707 -- Reset transaction state after requests
Backpatch of a4e97cf315
2013-02-10 14:09:58 +02:00
Preston Holmes bb12ea2cf1 [1.5.x] Made modwsgi groups_for_user consistent with check_password
2b5f848207 based its changes on #19061
that made the is_active attribute mandatory for user models.
The try/except was not removed for the groups_for_user function.

refs #19780
2013-02-09 09:33:34 -08:00
Claude Paroz b8c6de31a6 [1.5.x] Fixed #19779 -- Checked contrib.sites presence in RedirectFallbackMiddleware
Thanks Aymeric Augustin for the report and directions for the patch.
Backport of 2ed90eac from master.
2013-02-08 16:36:57 +01:00
Preston Holmes 830b9fde46 [1.5.x] Fixed #19776 -- Added missing import for backport
line was present on master from 1520748dac
2013-02-08 00:28:37 -08:00
Preston Holmes 660f80c3d6 [1.5.x] Fixed #19662 -- alter auth modelbackend to accept custom username fields
Thanks to Aymeric and Carl for the review.
2013-02-07 16:08:23 -08:00
Aymeric Augustin 833ccd4b5b [1.5.x] Fixed #19772 -- Handled APPEND_SLASH correctly in the redirects app.
Backport of 64623a2.
2013-02-07 22:38:14 +01:00
Claude Paroz 20ac33100c Partially revert 9efe1a721, strip_tags improvements
The new regex seems not stable enough for being released. Stripping
with regex might need reevaluation for the next release.
Refs #19237.
2013-02-06 21:19:41 +01:00
Claude Paroz 933e956ba4 [1.5.x] Fixed #19745 -- Forced resolution of verbose names in createsupersuser
Thanks Baptiste Mispelon for the report and Preston Holmes for the review.
Backport of 2390fe3f4 from master.
2013-02-06 10:06:57 +01:00
Claude Paroz 7a90c6adcc [1.5.x] Updated translations (bn/es/eu/lb/mn) 2013-02-04 21:09:20 +01:00