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

Trim the subject before encrypting the subject #383

Merged
merged 1 commit into from Jul 16, 2019

Conversation

@nickvergessen
Copy link
Member

nickvergessen commented Jul 16, 2019

Fix #346

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen

This comment has been minimized.

Copy link
Member Author

nickvergessen commented Jul 16, 2019

/backport to stable16

@nickvergessen

This comment has been minimized.

Copy link
Member Author

nickvergessen commented Jul 16, 2019

/backport to stable15

@nickvergessen

This comment has been minimized.

Copy link
Member Author

nickvergessen commented Jul 16, 2019

/backport to stable14

Copy link
Member

MorrisJobke left a comment

Code looks good 👍

$subject = $notification->getParsedSubject();
$dataLength = 245 - strlen(json_encode($data));
if (strlen($subject) > $dataLength) {
$data['subject'] = substr($subject, 0, $dataLength) . '';

This comment has been minimized.

Copy link
@rullzer

rullzer Jul 16, 2019

Member

Should the substr not be 1 shorter than the dataLength?

This comment has been minimized.

Copy link
@nickvergessen

nickvergessen Jul 16, 2019

Author Member

I started with 245, instead of 255 so we have a little buffer there

This comment has been minimized.

Copy link
@rullzer

rullzer Jul 16, 2019

Member

Ah ok perfect. I wasn't sure if that was maybe for other metadata somewhere.

@nickvergessen nickvergessen merged commit a5de371 into master Jul 16, 2019
3 of 4 checks passed
3 of 4 checks passed
continuous-integration/drone/pr Build is pending
Details
DCO DCO
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fixupbot No fixup commits found. The commit history is clean 👍
Details
@delete-merged-branch delete-merged-branch bot deleted the bugfix/346/trim-subject-before-encrypting branch Jul 16, 2019
@backportbot-nextcloud

This comment has been minimized.

Copy link

backportbot-nextcloud bot commented Jul 16, 2019

backport to stable16 in #384

@backportbot-nextcloud

This comment has been minimized.

Copy link

backportbot-nextcloud bot commented Jul 16, 2019

backport to stable15 in #385

@backportbot-nextcloud

This comment has been minimized.

Copy link

backportbot-nextcloud bot commented Jul 16, 2019

backport to stable14 in #386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.