-
Notifications
You must be signed in to change notification settings - Fork 31
Merge changes from teonsystems #8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
…me being, add license and disclamer, suggest original package.
…ins about it. As soon as original package updates this dependency to recent release (2.x+), this should be reverted.
Reason: If email content file is pulled directly from Maildir on Linux, it has body newlines separated by \n rather than \r\n which is what mail systems use internally (unverified claim!). This broke validation.
Merging original licensing info, as specified by original author: #5
Thanks - I'll work on this today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of stylistic changes here that differ significantly from what I was originally intending. Let me take some more time to review these, but I might just take some of what you've done and adapt it to fit in more with what has been working.
Also, there are some breaking changes here that I'd like to avoid.
* [openssl](http://us1.php.net/manual/en/openssl.installation.php) | ||
* [phpseclib](http://phpseclib.sourceforge.net/) | ||
``` | ||
composer require teon/dkim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace needs to be amended for the PR
--------- | ||
```php | ||
$msgContent = "..."; | ||
$dkimValidator = new \Teon\DKIM\Validator($msgContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amend the namespace
|
||
define('PHPSECLIB_USE_EXCEPTIONS', true); | ||
namespace Teon\DKIM; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amend namespace
@@ -38,13 +31,13 @@ | |||
* | |||
* @param string $rawMessage | |||
* @return DKIM | |||
* @throws DKIM_Exception | |||
* @throws Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd really prefer to avoid throwing generic exceptions, since the code could be wrapped in libraries with multiple exceptions, and an precise exception type is very useful
This PR is somewhat messy, but you'll need to deal with the fairly large differences in this fork anyway. See #7