Fossil SCM
Fix the captcha-audio page so that it works even without a seed value.
Commit
a1178d57340baa9620731e92de175b234e8e6fd7773485b264697a417443f85f
Parent
5dc3d2f156915f1…
1 file changed
+1
-1
+1
-1
| --- src/captcha.c | ||
| +++ src/captcha.c | ||
| @@ -685,11 +685,11 @@ | ||
| 685 | 685 | ** |
| 686 | 686 | ** Return a WAV file that pronounces the digits of the captcha that |
| 687 | 687 | ** is determined by the seed given in the name= query parameter. |
| 688 | 688 | */ |
| 689 | 689 | void captcha_wav_page(void){ |
| 690 | - const char *zSeed = P("name"); | |
| 690 | + const char *zSeed = PD("name","0"); | |
| 691 | 691 | const char *zDecode = captcha_decode((unsigned int)atoi(zSeed)); |
| 692 | 692 | Blob audio; |
| 693 | 693 | captcha_wav(zDecode, &audio); |
| 694 | 694 | cgi_set_content_type("audio/wav"); |
| 695 | 695 | cgi_set_content(&audio); |
| 696 | 696 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -685,11 +685,11 @@ | |
| 685 | ** |
| 686 | ** Return a WAV file that pronounces the digits of the captcha that |
| 687 | ** is determined by the seed given in the name= query parameter. |
| 688 | */ |
| 689 | void captcha_wav_page(void){ |
| 690 | const char *zSeed = P("name"); |
| 691 | const char *zDecode = captcha_decode((unsigned int)atoi(zSeed)); |
| 692 | Blob audio; |
| 693 | captcha_wav(zDecode, &audio); |
| 694 | cgi_set_content_type("audio/wav"); |
| 695 | cgi_set_content(&audio); |
| 696 |
| --- src/captcha.c | |
| +++ src/captcha.c | |
| @@ -685,11 +685,11 @@ | |
| 685 | ** |
| 686 | ** Return a WAV file that pronounces the digits of the captcha that |
| 687 | ** is determined by the seed given in the name= query parameter. |
| 688 | */ |
| 689 | void captcha_wav_page(void){ |
| 690 | const char *zSeed = PD("name","0"); |
| 691 | const char *zDecode = captcha_decode((unsigned int)atoi(zSeed)); |
| 692 | Blob audio; |
| 693 | captcha_wav(zDecode, &audio); |
| 694 | cgi_set_content_type("audio/wav"); |
| 695 | cgi_set_content(&audio); |
| 696 |