electron-builder: URLs generated by s3Url result in certificate error on request -> breaks S3 autoUpdate

  • Version: 15.4.2
  • Target: mac, win

In https://github.com/electron-userland/electron-builder/commit/7041b5d3e2b17983973d5cea41215b5c371609d7#diff-36ba9eb20bed1b6c45f54cf4faedfcabL81, the s3Url method behavior was changed from https://s3.amazonaws.com/${options.bucket} to https://${options.bucket}.s3.amazonaws.com.

Resulting Problem: If the bucket name contains any dots, requesting new URL will result in a SSL certificate warning (AWS S3 wildcard certificate is *.s3.amazonaws.com, s3.amazonaws.com -> doesn’t match). This is already mentioned here: https://github.com/electron-userland/electron-builder/commit/7041b5d3e2b17983973d5cea41215b5c371609d7#diff-b8b7b963245d02b44186a38315e09df6L85

format https://s3.amazonaws.com/bucket_name must be used

I guess this just got lost when committing.

Result: S3 auto-update checks don’t work as they get stuck in a SSL certificate warning.

Solution: Revert the s3Url method behavior.

I will create a pull request soon. Maybe I’m missing something, but was there a reason for this change?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (18 by maintainers)

Commits related to this issue

Most upvoted comments

Note: Instead of having to set a region manually in the options, we could identify the region programmatically (via bucket.get_location like described by https://github.com/boto/boto/issues/2836#issuecomment-250434915).

I will implement the option.region variant as it is is easier, but it would be a nice iteration for the future if anyone is fancy doing it.

(related discussion in the AWS Developer Forums: https://forums.aws.amazon.com/message.jspa?messageID=705909)