Web based family history software

This Help forum is for issues relates to the latest release (1.7.8). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

Question [SOLVED] Error: escapeshellarg() disabled

  • jprause
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 3 months ago #1 by jprause
Error: escapeshellarg() disabled was created by jprause
My website is configured like this:
Sending email > Messages = 'use PHP mail to send messages',
Users' preferred contact method = 'Internal messaging with emails';

When sending a message to a webtrees user I get an error message (in the website error log):
Code:
Mail: /data/web/virtuals/37758/virtual/www/subdom/fami/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/MailTransport.php:252 escapeshellarg() has been disabled for security reasons

My webhosting's staff say they can't enable escapeshellarg() function for security reasons.
Is there any sensible way how to deal with this issue?
Thanks.

Josef

webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit

Please Log in or Create an account to join the conversation.

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 3 months ago #2 by fisharebest
Replied by fisharebest on topic Error: escapeshellarg() disabled
The function "escapeshellarg()" is NOT a security risk. It is a very simple string function. It does approximately the same as this:
Code:
function escapeshellarg($input) { return "'" . str_replace('\'', '\\\'', $input) . "'"; }

> My webhosting's staff say they can't enable escapeshellarg() function for security reasons.

I would disagree with this. /sigh.

> Is there any sensible way how to deal with this issue?

Use SMTP mail instead? Does your webhost provide SMTP?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • jprause
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 3 months ago - 7 years 3 months ago #3 by jprause
Replied by jprause on topic Error: escapeshellarg() disabled
Instead of presumably hopeless discussion with my webhost I've set
Sending email > Messages = 'use SMTP to send messages' and used my Google mail account.
The hint at the bottom of SMTP mail server section is very useful.
Now it works fine, thank you.

Josef

webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit
Last edit: 7 years 3 months ago by jprause.

Please Log in or Create an account to join the conversation.

  • jprause
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 3 months ago #4 by jprause
Replied by jprause on topic [SOLVED] Error: escapeshellarg() disabled
Problem solved.

Josef

webhosting:-- webtrees 2.1.18, PHP version 8.1.16, MySQL 8.0.22, test site webtrees 2.1.18
local desktop:-- webtrees 2.1.18, PHP version 8.2.12, MySQL 8.0.28, Apache2 2.4.41, Linux Ubuntu 22.04 64bit

Please Log in or Create an account to join the conversation.

  • fisharebest
  • Away
  • Administrator
  • Administrator
More
7 years 3 months ago #5 by fisharebest
Replied by fisharebest on topic [SOLVED] Error: escapeshellarg() disabled
The swiftmailer library has just been updated. It no longer uses the escapeshellarg function.

I will include this update in the next release of webtrees.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}