Skip to content

Commit

Permalink
app_api-2.0: fixed forgot about slash removal (#213)
Browse files Browse the repository at this point in the history
Subj, **make CI green**.

---------

Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Jan 25, 2024
1 parent 533f231 commit 2aa0700
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/analysis-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Uninstall NcPyApi
run: |
php occ app_api:app:unregister "$APP_ID" --silent
php occ app_api:app:unregister "$APP_ID" --silent --force
php occ app_api:daemon:unregister manual_install
- name: Generate coverage report (2)
Expand Down Expand Up @@ -316,7 +316,7 @@ jobs:
- name: Uninstall NcPyApi
run: |
php occ app_api:app:unregister "$APP_ID" --silent
php occ app_api:app:unregister "$APP_ID" --silent --force
php occ app_api:daemon:unregister manual_install
- name: Generate coverage report (2)
Expand Down Expand Up @@ -610,7 +610,7 @@ jobs:
- name: Uninstall NcPyApi
run: |
php occ app_api:app:unregister "$APP_ID" --silent
php occ app_api:app:unregister "$APP_ID" --silent --force
php occ app_api:daemon:unregister manual_install
- name: Generate coverage report (2)
Expand Down Expand Up @@ -790,7 +790,7 @@ jobs:

- name: Uninstall NcPyApi
run: |
php occ app_api:app:unregister "$APP_ID" --silent
php occ app_api:app:unregister "$APP_ID" --silent --force
php occ app_api:daemon:unregister manual_install
- name: Generate coverage report (2)
Expand Down
4 changes: 2 additions & 2 deletions nc_py_api/talk_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def __init__(self, callback_url: str, display_name: str, description: str = ""):
:param display_name: The display name of the bot that is shown as author when it posts a message or reaction.
:param description: Description of the bot helping moderators to decide if they want to enable this bot.
"""
self.callback_url = callback_url
self.callback_url = callback_url.lstrip("/")
self.display_name = display_name
self.description = description

Expand Down Expand Up @@ -318,7 +318,7 @@ async def _sign_send_request(self, method: str, url_suffix: str, data: dict, dat

def __get_bot_secret(callback_url: str) -> str:
sha_1 = hashlib.sha1(usedforsecurity=False)
string_to_hash = os.environ["APP_ID"] + "_" + callback_url
string_to_hash = os.environ["APP_ID"] + "_" + callback_url.lstrip("/")
sha_1.update(string_to_hash.encode("UTF-8"))
return sha_1.hexdigest()

Expand Down

0 comments on commit 2aa0700

Please sign in to comment.