Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helmo
ISPConfig 3
Commits
4c794a56
Commit
4c794a56
authored
10 years ago
by
Florian Schaal
Browse files
Options
Downloads
Patches
Plain Diff
Suppress output from exec
parent
06787deb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
interface/web/mail/mail_domain_dkim_create.php
+3
-3
3 additions, 3 deletions
interface/web/mail/mail_domain_dkim_create.php
server/plugins-available/mail_plugin_dkim.inc.php
+1
-1
1 addition, 1 deletion
server/plugins-available/mail_plugin_dkim.inc.php
with
4 additions
and
4 deletions
interface/web/mail/mail_domain_dkim_create.php
+
3
−
3
View file @
4c794a56
...
@@ -80,7 +80,7 @@ function get_public_key($private_key) {
...
@@ -80,7 +80,7 @@ function get_public_key($private_key) {
require_once
(
'../../lib/classes/validate_dkim.inc.php'
);
require_once
(
'../../lib/classes/validate_dkim.inc.php'
);
$validate_dkim
=
new
validate_dkim
();
$validate_dkim
=
new
validate_dkim
();
if
(
$validate_dkim
->
validate_post
(
'private'
,
$private_key
))
{
/* validate the $_POST-value */
if
(
$validate_dkim
->
validate_post
(
'private'
,
$private_key
))
{
/* validate the $_POST-value */
exec
(
'echo '
.
escapeshellarg
(
$private_key
)
.
'|openssl rsa -pubout -outform PEM'
,
$pubkey
,
$result
);
exec
(
'echo '
.
escapeshellarg
(
$private_key
)
.
'|openssl rsa -pubout -outform PEM
2> /dev/null
'
,
$pubkey
,
$result
);
$public_key
=
pub_key
(
$pubkey
);
$public_key
=
pub_key
(
$pubkey
);
}
else
{
}
else
{
$public_key
=
'invalid key'
;
$public_key
=
'invalid key'
;
...
@@ -92,8 +92,8 @@ $_POST=getRealPOST();
...
@@ -92,8 +92,8 @@ $_POST=getRealPOST();
switch
(
$_POST
[
'action'
])
{
switch
(
$_POST
[
'action'
])
{
case
'create'
:
/* create DKIM Private-key */
case
'create'
:
/* create DKIM Private-key */
exec
(
'openssl rand -out /usr/local/ispconfig/server/temp/random-data.bin 4096'
,
$output
,
$result
);
exec
(
'openssl rand -out /usr/local/ispconfig/server/temp/random-data.bin 4096
2> /dev/null
'
,
$output
,
$result
);
exec
(
'openssl genrsa -rand /usr/local/ispconfig/server/temp/random-data.bin 1024'
,
$privkey
,
$result
);
exec
(
'openssl genrsa -rand /usr/local/ispconfig/server/temp/random-data.bin 1024
2> /dev/null
'
,
$privkey
,
$result
);
unlink
(
"/usr/local/ispconfig/server/temp/random-data.bin"
);
unlink
(
"/usr/local/ispconfig/server/temp/random-data.bin"
);
foreach
(
$privkey
as
$values
)
$private_key
=
$private_key
.
$values
.
"
\n
"
;
foreach
(
$privkey
as
$values
)
$private_key
=
$private_key
.
$values
.
"
\n
"
;
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
server/plugins-available/mail_plugin_dkim.inc.php
+
1
−
1
View file @
4c794a56
...
@@ -181,7 +181,7 @@ class mail_plugin_dkim {
...
@@ -181,7 +181,7 @@ class mail_plugin_dkim {
$app
->
log
(
'Saved DKIM Private-key to '
.
$key_file
.
'.private'
,
LOGLEVEL_DEBUG
);
$app
->
log
(
'Saved DKIM Private-key to '
.
$key_file
.
'.private'
,
LOGLEVEL_DEBUG
);
$success
=
true
;
$success
=
true
;
/* now we get the DKIM Public-key */
/* now we get the DKIM Public-key */
exec
(
'cat '
.
escapeshellarg
(
$key_file
.
'.private'
)
.
'|openssl rsa -pubout'
,
$pubkey
,
$result
);
exec
(
'cat '
.
escapeshellarg
(
$key_file
.
'.private'
)
.
'|openssl rsa -pubout
2> /dev/null
'
,
$pubkey
,
$result
);
$public_key
=
''
;
$public_key
=
''
;
foreach
(
$pubkey
as
$values
)
$public_key
=
$public_key
.
$values
.
"
\n
"
;
foreach
(
$pubkey
as
$values
)
$public_key
=
$public_key
.
$values
.
"
\n
"
;
/* save the DKIM Public-key in dkim-dir */
/* save the DKIM Public-key in dkim-dir */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment