Skip to content

Commit

Permalink
Bug fix in http encrypted connection.
Browse files Browse the repository at this point in the history
- Cassandra encrypts ASCII 126 now with right value
  • Loading branch information
EinEinfach committed Aug 18, 2023
1 parent 474e012 commit afdb552
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CaSSAndRA/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Version:0.50.0 -> Rover angle comming now from Sunray FW. Added some debug messages
#Version:0.50.1 -> Bug fix in http encryption connection. Cassandra encrypt ASCII 126 with invalid value

# create logger
import logging
Expand Down
2 changes: 1 addition & 1 deletion CaSSAndRA/src/backend/comm/httpcomm.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def cmd_to_rover(connect_data: dict(), connection: list()) -> int():
logger.debug('Encryption: true')
data_ascii = [ord(c) for c in data]
data_encrypt = [x + encryptkey for x in data_ascii]
data_encrypt = [x - 126 + 31 if x>=126 else x for x in data_encrypt]
data_encrypt = [x - 126 + 31 if x>126 else x for x in data_encrypt]
data = ''.join(map(chr, data_encrypt))
try:
logger.debug('Data to be send: '+data)
Expand Down
2 changes: 2 additions & 0 deletions CaSSAndRA/src/backend/data/appdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from datetime import datetime

version = '0.50.1'

commcfg = {
"USE": "HTTP",
"MQTT": [
Expand Down
4 changes: 4 additions & 0 deletions CaSSAndRA/src/components/modalinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

from . import ids
from src.backend.data.roverdata import robot
from src.backend.data import appdata

info = dbc.Modal([
dbc.ModalHeader(dbc.ModalTitle('Info')),
dbc.ModalBody(id=ids.MODALINFOBODY),
dbc.ModalFooter([
html.Div(['CaSSAndRA Version: '+appdata.version], style={'font-size': '10px'})
])
],
id=ids.MODALINFO,
is_open=False,
Expand Down

0 comments on commit afdb552

Please sign in to comment.