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

APNS (HTTP/2) certificate check doesn't happen #505

Open
shekhirin opened this issue May 30, 2019 · 3 comments
Open

APNS (HTTP/2) certificate check doesn't happen #505

shekhirin opened this issue May 30, 2019 · 3 comments

Comments

@shekhirin
Copy link

shekhirin commented May 30, 2019

Describe the bug
Some important validations in APNS2 are missed.

validate :certificate_has_matching_private_key

To Reproduce
Steps to reproduce the behavior:

  1. app = Rpush::Apns::App.new
  2. app.certificate = "wrong certificate"
  3. app.save
  4. Everything's fine!

Expected behavior

errors.add :certificate, 'value must contain a certificate and a private key.'

System configuration

  • OS: macOS
  • OS version: 10.14.4
  • Ruby version: 2.2.2
  • Rails version: 4.0.13
  • Rpush version: 3.0.2

Additional context
Validations are being executed in self.included(base) method of Rpush::Client::ActiveModel::Apns::App module but it actually called with extend not include in Rpush::Client::ActiveModel::Apns2::App

extend Rpush::Client::ActiveModel::Apns::App

@shekhirin shekhirin changed the title APNS (HTTP/2) certificate check doens't happen APNS (HTTP/2) certificate check doesn't happen Jun 20, 2019
@drn
Copy link
Contributor

drn commented Jul 30, 2019

Thanks @shekhirin - sorry for the delayed response. It seems like you already have a proposed solution. Feel free to open a PR for this and I can facilitate getting the changes merged.

@stale
Copy link

stale bot commented Jul 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please leave another comment. This issue will be closed if no further activity occurs.
Thank you for all your contributions!

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. If this is still an issue, please leave another comment. This issue will be closed if no further activity occurs.
Thank you for all your contributions!

@stale stale bot added the stale label Apr 16, 2022
@aried3r aried3r removed the stale label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants