juzibot / donut-tester

40 stars 4 forks source link

FileBox image naming potential risk #26

Open why2lyj opened 4 years ago

why2lyj commented 4 years ago

1. Versions

2. Describe the bug

for image_url in image_urls:
    file_box = FileBox.from_url(f'''{image}''', name='jing-dong.jpg')

code as above, if there're some images need to use FileBox function from_url to send, the paramater name is always the same one(such like jing-dong.jpg), it will make the server(it shoule be grpc) side breakdown and finally get the connection lost from our code.

3. To Reproduce

Steps to reproduce the behavior:

  1. using above code and make sure image_urls is be identified, urls shoule be different.
  2. send the images to a chat and wait, the issue will reproduce(it will take a long time)

4. Expected behavior

I know the Windows Hook should save the url image and send to a chat, the image saving name is indentified by name that from_url given, I suggest to add a timestamp on image's naming when saving the image

5. Actual behavior

6. Full Output Logs

7. Additional context

[bug]

why2lyj commented 4 years ago

an information need to update: if changed the naming for images(name parameter in file_box) when called, this issue will be occured as well.

su-chang commented 4 years ago

Thanks for your information. We will keep watching this case in the next new version.