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

parameter secret_token #1173

Merged
merged 18 commits into from
Jun 24, 2023
Merged

parameter secret_token #1173

merged 18 commits into from
Jun 24, 2023

Conversation

sheldygg
Copy link
Contributor

@sheldygg sheldygg commented Apr 30, 2023

Description

Added X-Telegram-Bot-Api-Secret-Token header check

  • New feature (non-breaking change which adds functionality)

Test Configuration:

  • Operating System: Windows 10
  • Python version: 3.11

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@github-actions github-actions bot added the 3.x Issue or PR for stable 3.x version label Apr 30, 2023
@github-actions
Copy link

github-actions bot commented Apr 30, 2023

✔️ Changelog found.

Thank you for adding a description of the changes

Copy link
Member

@JrooTJunior JrooTJunior left a comment

Choose a reason for hiding this comment

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

  1. Changes is not covered by tests
  2. Is not documented
  3. Can be applied only for simple static secret token validation (SimpleRequestHandler-like handlers wtih static bot instance)
  4. Is totally not compatible with multibot-systems

So, this feature should be discussed before implementation

aiogram/webhook/aiohttp_server.py Outdated Show resolved Hide resolved
@JrooTJunior JrooTJunior added the new feature Missing feature label Apr 30, 2023
@JrooTJunior
Copy link
Member

Any news?

@sheldygg
Copy link
Contributor Author

sheldygg commented May 8, 2023

unban in tg chat. I dont quite understand what I need to do
https://t.me/yeatlil

@JrooTJunior
Copy link
Member

It is unacceptable to justify Russian terrorism and violation of the territorial integrity of Ukraine, I don't want this to happen in my chats, that's why you can't be unbanned.

@sheldygg
Copy link
Contributor Author

sheldygg commented May 9, 2023

I saw a person who wrote something in the chat, and it was written in his channel that the LPR is Russia. I wanted him banned and threw it into the chat. Your wife did it, but then you came and banned me. I don't support Russians, I'm from Ukraine, Chernihiv region

@sheldygg
Copy link
Contributor Author

sheldygg commented May 9, 2023

https://t.me/kugona
profile of the person who wrote it
image

@sheldygg
Copy link
Contributor Author

sheldygg commented May 9, 2023

я не виноват =(

@JrooTJunior
Copy link
Member

But you send the same message

@sheldygg
Copy link
Contributor Author

sheldygg commented May 10, 2023

But you send the same message

I wanted everyone to see what he had in his channel. those who communicated at that time in the chat understood what i mean.
i wanted him to be banned.
sorry Alex 🥺
Glory to Ukraine

@JrooTJunior
Copy link
Member

Glory to the heroes!

Ok, you are unlocked, but you can also visit the Ukrainian chat.

@sheldygg sheldygg requested a review from JrooTJunior May 10, 2023 18:00
aiogram/webhook/aiohttp_server.py Outdated Show resolved Hide resolved
aiogram/webhook/aiohttp_server.py Outdated Show resolved Hide resolved
aiogram/webhook/aiohttp_server.py Outdated Show resolved Hide resolved
@sheldygg sheldygg requested a review from JrooTJunior May 11, 2023 05:30
aiogram/webhook/aiohttp_server.py Outdated Show resolved Hide resolved
Co-authored-by: Oleg A. <t0rr@mail.ru>
@sheldygg sheldygg requested a review from Olegt0rr May 11, 2023 16:38
@sheldygg sheldygg requested a review from Olegt0rr May 13, 2023 11:21
@sheldygg
Copy link
Contributor Author

hm...

@sheldygg sheldygg changed the title added parameter secret_token parameter secret_token May 29, 2023
@codecov
Copy link

codecov bot commented May 29, 2023

Codecov Report

Merging #1173 (784679b) into dev-3.x (cf269e1) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1173   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          358       358           
  Lines         8841      8850    +9     
=========================================
+ Hits          8841      8850    +9     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiogram/webhook/aiohttp_server.py 100.00% <100.00%> (ø)

@JrooTJunior JrooTJunior merged commit a890622 into aiogram:dev-3.x Jun 24, 2023
22 checks passed
Aqendo added a commit to Aqendo/aiogram that referenced this pull request Jun 30, 2023
* parameter secret_token (aiogram#1173)

* Added secret token validation

* Fixed workflow data propagation (aiogram#1196)

* Coverage

* Added changelog

* aiogram#1191 Added possibility to pass custom headers to URLInputFile object (aiogram#1197)

---------

Co-authored-by: sheldy <85823514+sheldygg@users.noreply.github.com>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issue or PR for stable 3.x version new feature Missing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants