summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2016-11-02 14:44:15 +0100
committerTim Graham <timograham@gmail.com>2016-11-08 16:45:12 -0500
commit32f50999cd4ccf4e5667f20df3d89421c599a9af (patch)
tree61cc526b6d3718870d393e12e13e908256158559
parent90c61538bae7b6e86b846fcd1ab7887d9cdb2cbf (diff)
[1.8.x] Fixed #27420 -- Quoted the Oracle test user password in queries.
Backport of c4b04e1598c4325454c808183dce17b284ed9e28 from master
-rw-r--r--django/db/backends/oracle/creation.py4
-rw-r--r--docs/ref/databases.txt1
-rw-r--r--docs/releases/1.8.17.txt14
-rw-r--r--docs/releases/index.txt1
4 files changed, 18 insertions, 2 deletions
diff --git a/django/db/backends/oracle/creation.py b/django/db/backends/oracle/creation.py
index 28475a6e55..255a77075e 100644
--- a/django/db/backends/oracle/creation.py
+++ b/django/db/backends/oracle/creation.py
@@ -174,7 +174,7 @@ class DatabaseCreation(BaseDatabaseCreation):
print("_create_test_user(): username = %s" % parameters['user'])
statements = [
"""CREATE USER %(user)s
- IDENTIFIED BY %(password)s
+ IDENTIFIED BY "%(password)s"
DEFAULT TABLESPACE %(tblspace)s
TEMPORARY TABLESPACE %(tblspace_temp)s
QUOTA UNLIMITED ON %(tblspace)s
@@ -191,7 +191,7 @@ class DatabaseCreation(BaseDatabaseCreation):
success = self._execute_allow_fail_statements(cursor, statements, parameters, verbosity, acceptable_ora_err)
# If the password was randomly generated, change the user accordingly.
if not success and self._test_settings_get('PASSWORD') is None:
- set_password = "ALTER USER %(user)s IDENTIFIED BY %(password)s"
+ set_password = 'ALTER USER %(user)s IDENTIFIED BY "%(password)s"'
self._execute_statements(cursor, [set_password], parameters, verbosity)
# Most test-suites can be run without the create-view privilege. But some need it.
extra = "GRANT CREATE VIEW TO %(user)s"
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index ed15390e45..29ac9dd1c0 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -729,6 +729,7 @@ To run a project's test suite, the user usually needs these *additional*
privileges:
* CREATE USER
+* ALTER USER
* DROP USER
* CREATE TABLESPACE
* DROP TABLESPACE
diff --git a/docs/releases/1.8.17.txt b/docs/releases/1.8.17.txt
new file mode 100644
index 0000000000..2464d155da
--- /dev/null
+++ b/docs/releases/1.8.17.txt
@@ -0,0 +1,14 @@
+===========================
+Django 1.8.17 release notes
+===========================
+
+*Under development*
+
+Django 1.8.17 fixes a regression in 1.8.16.
+
+Bugfixes
+========
+
+* Quoted the Oracle test user's password in queries to fix the "ORA-00922:
+ missing or invalid option" error when the password starts with a number or
+ special character (:ticket:`27420`).
diff --git a/docs/releases/index.txt b/docs/releases/index.txt
index 134da0fc2c..997ac0b1d7 100644
--- a/docs/releases/index.txt
+++ b/docs/releases/index.txt
@@ -25,6 +25,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree::
:maxdepth: 1
+ 1.8.17
1.8.16
1.8.15
1.8.14