Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bloom.go #437

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

alanxiongxing
Copy link

@alanxiongxing alanxiongxing commented Sep 14, 2024

用法过时了,已更新

Greptile Summary

This PR updates the Redis connection setup in the bloom filter example, addressing a deprecated function usage but introducing potential security concerns.

  • Replaced deprecated redis.New() with redis.MustNewRedis() in bloom/bloom.go
  • Added RedisConf struct with hardcoded Redis host, password, and node type
  • Potential security risk: Hardcoded Redis password "redis_6X6RSk" in the code
  • Reduced flexibility: Redis configuration now hardcoded instead of being parameterized
  • Consider moving Redis configuration to a separate, non-versioned config file for better security and flexibility

用法过时了,已更新
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Comment on lines +11 to +14
//store := redis.New("192.168.8.6:6379") //过时的
redconf := redis.RedisConf{Host: "192.168.8.6:6379",
Pass: "redis_6X6RSk", Type: "node"}
store := redis.MustNewRedis(redconf)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Hardcoding Redis credentials in the source code is a security risk. Consider using environment variables or a configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant