Frederisk / Wikitext-VSCode-Extension

A Visual Studio Code Extension that provides language support for Wikitext.
MIT License
89 stars 14 forks source link

Extension committing edits while logged out #88

Closed TechnoSquirrel69 closed 10 months ago

TechnoSquirrel69 commented 10 months ago

I have the "auto login" setting on "always", so I'm not sure why the extension committed edits without credentials here. I can share diffs and notification messages generated by the extension privately — my emails are enabled on the English Wikipedia.

Frederisk commented 10 months ago

I don't quite understand what you mean. What kind of certificate are you referring to?

There is nothing special about the automatic login function. The logic is:

Of course, if you still think there is a problem with any content, you are also welcome to send a message to my personal email address. <frederisk[AT]outlook.com>

TechnoSquirrel69 commented 10 months ago

It just happened again. The problem I'm facing is related to your second point: the extension is not logging in before publishing the edit, and is instead publishing it as an IP address. I'm not sure if the login is failing on the server side or the client side — maybe the automatic login function needs a condition to catch failed logins?

Frederisk commented 10 months ago

Oh, I see. What you're saying is that the extension occasionally posts edits by IP instead of logging in to the account, when using the auto-login feature.

Does this always happen? And does the extension show any warnings or errors?

TechnoSquirrel69 commented 10 months ago

No on both questions. I experimented a little bit to see what was causing the extension to commit edits without logging in, but couldn't pin down the issue exactly. However, I think both of the times the issue cropped up, I'd had VSCode open for a while without any activity. (Don't quote me on that, though.) After it happened the second time, I closed VSCode and tried again, and the extension logged in as expected before committing the edit.

Frederisk commented 10 months ago

I originally thought I found the problem, however, I checked the code again and didn't find much.

Can you tell me if a message with the content User "[UserName]"(UserID:"[UserID]" Login Result.... pops up when the error occurs?

Frederisk commented 10 months ago

Or when you encounter the problem again, please take a screenshot of all the notifications that pop up in the lower right corner and pass them to me. (You can erase the content related to privacy)

I'm going to work on some temporary possible fixes for this issue to try and alleviate the problem.

TechnoSquirrel69 commented 10 months ago

I haven't had it crop up again (keeping in mind that I've been avoiding using the extension after leaving VSCode open for several hours, which I think is related to the issue), but I don't recall that the regular login notification popped up the previous couple times, just the normal "edit action success" message. I suppose that's kind of the problem, though, if that means that the extension is missing the login step before committing the edit.

Frederisk commented 10 months ago

I checked the logic again, but still found no problem. Instead I added more checking logic to avoid unnecessary IP leaks. I'm not sure this issue will ever be completely resolved. I will publish an improved version and close this issue, if this problem reappears in the future, please feel free to open this issue.