Skip to content

Commit

Permalink
[1.9.x] Fixed #27420 -- Quoted the Oracle test user password in queries.
Browse files Browse the repository at this point in the history
Backport of c4b04e1 from master
  • Loading branch information
felixxm authored and timgraham committed Nov 8, 2016
1 parent 734ef02 commit a3fa2c4
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/backends/oracle/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _create_test_user(self, cursor, parameters, verbosity, keepdb=False):
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
Expand All @@ -226,7 +226,7 @@ def _create_test_user(self, cursor, parameters, verbosity, keepdb=False):
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"
Expand Down
1 change: 1 addition & 0 deletions docs/ref/databases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,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
Expand Down
14 changes: 14 additions & 0 deletions docs/releases/1.8.17.txt
Original file line number Diff line number Diff line change
@@ -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`).
14 changes: 14 additions & 0 deletions docs/releases/1.9.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
===========================
Django 1.9.12 release notes
===========================

*Under development*

Django 1.9.12 fixes a regression in 1.9.11.

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`).
2 changes: 2 additions & 0 deletions docs/releases/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ versions of the documentation contain the release notes for any later releases.
.. toctree::
:maxdepth: 1

1.9.12
1.9.11
1.9.10
1.9.9
Expand All @@ -43,6 +44,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
Expand Down

0 comments on commit a3fa2c4

Please sign in to comment.