Repeatable: Always on 32 character keys

Steps to repeat:
1. Create an API key from Baidu (http://lbsyun.baidu.com/apiconsole/key)
2. Insert key at admin/config/services/baidu_map
3. Save configuration

Expected Results:
The valid 32 character key should pass the form validation.

Actual Results:
Cannot save and use the valid key.

Perhaps Baidu has changed the key format for 32 character keys recently. The regex that validates the key (^([a-zA-Z0-9]){24}$)|(^([a-fA-F0-9]){32}$)/') does not allow lower and upper case a to z characters. Keys from Baidu have a-z characters, so valid keys like 90tuBdiMtr92DsyDMB1pKxuf5Fl702Oj are not permitted by the module. Changing the regex to (^([a-zA-Z0-9]){24}$)|(^([a-zA-Z0-9]){32}$)/') should fix the issue.

Comments

millerrs created an issue. See original summary.

millerrs’s picture

alexandrdnlv’s picture

Hi there. I can confirm, patch from #2 helped me well. Thanks!

henk’s picture

Hi, I also confirm the the patch #2. Thanks.

henk’s picture

Status: Active » Reviewed & tested by the community
aolaze’s picture

我想说这个的,1.0的版本中还是手贼,没有改正过来.自己改过来了。

xiukun.zhou’s picture

Hi everybody, please download dev branch.

xiukun.zhou’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.