-
Notifications
You must be signed in to change notification settings - Fork 58
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
Allow to change encoding used to store a key-value pair in redis. #294
Allow to change encoding used to store a key-value pair in redis. #294
Conversation
Codecov Report
@@ Coverage Diff @@
## ospd-openvas-20.08 #294 +/- ##
======================================================
- Coverage 82.71% 81.90% -0.81%
======================================================
Files 9 9
Lines 1481 1509 +28
======================================================
+ Hits 1225 1236 +11
- Misses 256 273 +17
Continue to review full report at Codecov.
|
ospd_openvas/db.py
Outdated
def _add_single_item( | ||
self, name: str, values: Iterable, utf8_enc: Optional[bool] = False | ||
): | ||
''' Changing the encoding format of an existent redis context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''' Changing the encoding format of an existent redis context | |
''' Changing the encoding format of an existing redis context |
ospd_openvas/db.py
Outdated
self, openvas_scan_id: str, preferences: Iterable | ||
): | ||
''' Force the usage of the utf-8 encoding, since some credentials | ||
contains specials chars not supported by latin-1 enconding. ''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains specials chars not supported by latin-1 enconding. ''' | |
contain special chars not supported by latin-1 encoding. ''' |
ospd_openvas/db.py
Outdated
""" Connect to redis to the given database or to the default db 0 . | ||
|
||
Arguments: | ||
dbnum: The db number to connect to. | ||
encoding: The enconding to be used to read and write. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encoding: The enconding to be used to read and write. | |
encoding: The encoding to be used to read and write. |
Sorry, missed this one on the first go.
Some credentials contains utf-8 chars, while the standard for openvas is latin-1. This allows to change the encoding when storing credentials.
Update readme and changelog
Some credentials contains utf-8 chars, while the default for openvas
is latin-1. This allows to change the encoding when storing credentials.