Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes from teonsystems #8

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Merge changes from teonsystems #8

wants to merge 10 commits into from

Conversation

Synchro
Copy link

@Synchro Synchro commented Mar 4, 2016

This PR is somewhat messy, but you'll need to deal with the fairly large differences in this fork anyway. See #7

…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
@angrychimp
Copy link
Owner

Thanks - I'll work on this today.

Copy link
Owner

@angrychimp angrychimp left a 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
Copy link
Owner

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);
Copy link
Owner

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;
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants