Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lisa Casino
slapos
Commits
4c201202
Commit
4c201202
authored
Dec 13, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate secret key for php application.
parent
5d3204e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
slapos/recipe/apachephp/__init__.py
slapos/recipe/apachephp/__init__.py
+13
-7
software/wordpress/software.cfg
software/wordpress/software.cfg
+1
-1
software/wordpress/wp-config.php.in
software/wordpress/wp-config.php.in
+8
-8
No files found.
slapos/recipe/apachephp/__init__.py
View file @
4c201202
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
import
shutil
import
shutil
import
os
import
os
import
signal
import
signal
from
binascii
import
b2a_uu
as
uuencode
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
...
@@ -72,12 +73,17 @@ class Recipe(GenericBaseRecipe):
...
@@ -72,12 +73,17 @@ class Recipe(GenericBaseRecipe):
)
)
path_list
.
append
(
wrapper
)
path_list
.
append
(
wrapper
)
mysql_conf
=
dict
(
mysql_database
=
self
.
options
[
'mysql-database'
],
secret_key
=
uuencode
(
os
.
urandom
(
45
)).
strip
()
mysql_user
=
self
.
options
[
'mysql-username'
],
# Remove unsafe characters
mysql_password
=
self
.
options
[
'mysql-password'
],
secret_key
=
secret_key
.
translate
(
None
,
'"
\
'
'
)
mysql_host
=
'%s:%s'
%
(
self
.
options
[
'mysql-host'
],
self
.
options
[
'mysql-port'
]),
application_conf
=
dict
(
mysql_database
=
self
.
options
[
'mysql-database'
],
)
mysql_user
=
self
.
options
[
'mysql-username'
],
mysql_password
=
self
.
options
[
'mysql-password'
],
mysql_host
=
'%s:%s'
%
(
self
.
options
[
'mysql-host'
],
self
.
options
[
'mysql-port'
]),
secret_key
=
secret_key
,
)
directory
,
file_
=
os
.
path
.
split
(
self
.
options
[
'configuration'
])
directory
,
file_
=
os
.
path
.
split
(
self
.
options
[
'configuration'
])
...
@@ -91,7 +97,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -91,7 +97,7 @@ class Recipe(GenericBaseRecipe):
destination
=
os
.
path
.
join
(
path
,
file_
)
destination
=
os
.
path
.
join
(
path
,
file_
)
config
=
self
.
createFile
(
destination
,
config
=
self
.
createFile
(
destination
,
self
.
substituteTemplate
(
self
.
options
[
'template'
],
mysql
_conf
))
self
.
substituteTemplate
(
self
.
options
[
'template'
],
application
_conf
))
path_list
.
append
(
config
)
path_list
.
append
(
config
)
if
os
.
path
.
exists
(
self
.
options
[
'pid-file'
]):
if
os
.
path
.
exists
(
self
.
options
[
'pid-file'
]):
...
...
software/wordpress/software.cfg
View file @
4c201202
...
@@ -21,7 +21,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
...
@@ -21,7 +21,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
[application-configuration]
location = wp-config.php
location = wp-config.php
md5sum =
608dd9003a8edeb59c3aabc6cf43bbf9
md5sum =
3859841a4ad6ed23744d6bc5a01321e0
[versions]
[versions]
#slapos.cookbook = 0.12
#slapos.cookbook = 0.12
...
...
software/wordpress/wp-config.php.in
View file @
4c201202
...
@@ -42,14 +42,14 @@ define('DB_COLLATE', '');
...
@@ -42,14 +42,14 @@ define('DB_COLLATE', '');
*
*
* @since 2.6.0
* @since 2.6.0
*/
*/
define
(
'AUTH_KEY'
,
'
put your unique phrase here
'
);
define
(
'AUTH_KEY'
,
'
%(secret_key)s
'
);
define
(
'SECURE_AUTH_KEY'
,
'
put your unique phrase here
'
);
define
(
'SECURE_AUTH_KEY'
,
'
%(secret_key)s
'
);
define
(
'LOGGED_IN_KEY'
,
'
put your unique phrase here
'
);
define
(
'LOGGED_IN_KEY'
,
'
%(secret_key)s
'
);
define
(
'NONCE_KEY'
,
'
put your unique phrase here
'
);
define
(
'NONCE_KEY'
,
'
%(secret_key)s
'
);
define
(
'AUTH_SALT'
,
'
put your unique phrase here
'
);
define
(
'AUTH_SALT'
,
'
%(secret_key)s
'
);
define
(
'SECURE_AUTH_SALT'
,
'
put your unique phrase here
'
);
define
(
'SECURE_AUTH_SALT'
,
'
%(secret_key)s
'
);
define
(
'LOGGED_IN_SALT'
,
'
put your unique phrase here
'
);
define
(
'LOGGED_IN_SALT'
,
'
%(secret_key)s
'
);
define
(
'NONCE_SALT'
,
'
put your unique phrase here
'
);
define
(
'NONCE_SALT'
,
'
%(secret_key)s
'
);
/**#@-*/
/**#@-*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment