Comments (4)
If you have a bug to report, please provide more details. Otherwise, this issue tracker is not a support forum.
from captcha.
If you have a bug to report, please provide more details. Otherwise, this issue tracker is not a support forum.
I'm want change store.Expiration
- mycode pg base
package base
import (
"fmt"
"github.com/dchest/captcha"
)
func init() {
s := captcha.NewMemoryStore(100,30*time.Second)
// default Expiration = 10 * time.Minute // it's work (no matter when )
fmt.Println("newStorePointer",&s) // 0xc0003771a0
captcha.SetCustomStore(s)
}
func CreateCap(){
captcha.NewLen()
}
func CapImage(){
captcha.WriteImage()
}
.......
/////////////////////
captcha.go
const (
// Expiration time of captchas used by default store.
Expiration = 10 * time.Minute // it's work (no matter when )
)
// NewLen is just like New, but accepts length of a captcha solution as the
// argument.
func NewLen(length int) (id string) {
println("storePointer",&globalStore) // 0x13a4570
id = randomId()
globalStore.Set(id, RandomDigits(length))
return
}
i just wang set new Store (do't set store it's work 😀 nice tool)
i don't know how to check ......
Their Pointer seem to be inconsistent
use go version go1.14.2 windows/amd64
from captcha.
Hm... What if you move SetCustomStore outside of the init function, to some kind of manual initialization func (eg InitCaptcha), will it work?
from captcha.
Hm... What if you move SetCustomStore outside of the init function, to some kind of manual initialization func (eg InitCaptcha), will it work?
no work😟
from captcha.
Related Issues (20)
- image.go make func encodedPNG() to EncodedPNG() HOT 2
- Set background color HOT 6
- Security issue: Can't set custom security headers HOT 4
- How can i use captcha in Gin Framework? HOT 2
- captcha: id not found HOT 3
- provide `New() (id , solution string)` HOT 4
- the spacing between the digits too small, even overlap. How to solve it? HOT 2
- Is there no api for setting CollectNum and Expiration? HOT 2
- Hey I don't understand, why are you doing?
- Hey,Can you add an audio noise attribute? HOT 2
- How to generate a captcha in base64 format HOT 2
- How can i set png backgroun color ? Thanks HOT 2
- Add Letters HOT 1
- Jigsaw captcha HOT 1
- how to use captcha in echo HOT 1
- Can I set the background of the captcha instead of pure PNG image ? HOT 1
- too difficult to recognize audio captcha HOT 4
- Func VerifyString it works incorrectly HOT 1
- Prevent replay attacks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from captcha.