Unable to add 34 character long stripe keys,

I’m using latest version of opensource Sharetribe.

When I tried to add the stripe keys ( the 34 character ones, both public and secret )
I got a 500 internal server error, and the server log says

OpenSSL::Cipher::CipherError (data not multiple of block length):
I’ve already updated the config.yml from
stripe_private_key_pattern: “sk_(test|live)_.{24}”
stripe_publishable_key_pattern: “pk_(test|live)_.{24}”
to
stripe_private_key_pattern: “sk_(test|live)_.{34}”
stripe_publishable_key_pattern: “pk_(test|live)_.{34}”

and restarted the server but it didn’t fixed the issue.
Is there any way to fix this

Regards.

I think there is an additional underscore there:
stripe_publishable_key_pattern: "pk (test|live)_.{34}”

Remove it.

Regards
Nadeem

So sorry there was a typo in the post,
actually there are two underscores in both secret and private keys.
removing the underscore won’t help

Indeed, Stripe has changed things without prior warning.

A few more changes than the regex are needed though. That has been fixed in the following PRs:

In order to fix this, is that sufficient to just update the code or do I have to make updates in DB as well?

Do you already have some keys set that you want to update?
Or are you looking at inputting new keys from scratch?

Yes, I’ll add new keys from scratch.

Sounds great!

In that case, you can apply the two PRs I’ve shared earlier and follow the regular process to add your keys from your admin panel.

Keep up the good work!