bakape / shamichan

anonymous realtime imageboard focused on high performance and transparent moderation
Other
441 stars 74 forks source link

How to become admin? #1273

Closed MCMXCIII closed 3 years ago

MCMXCIII commented 3 years ago

hen entering the password the page refreshes and I dont receive a 403 but I am not sure how to reach the admin panel.... I am confused am I missing something?

bakape commented 3 years ago

Does the infinity menu in the top right corner show up?

MCMXCIII commented 3 years ago

The menu appears and I can login with the default but after that nothing happens?

I just wanted to know if I was missing something I can see in the source where the button is but nothing happens on the browser?

Kamuso commented 3 years ago

Can you check if the login cookies are being set? To do this, open the browser developer tools, go to the application tab, and look at the cookies in the storage section. The relevant cookies you're looking for are loginID and session.

bakape commented 3 years ago

Some screenshots would be nice as well.

On Fri, 12 Feb 2021 at 21:38, Kamuso notifications@github.com wrote:

Can you check if the login cookies are being set? To do this, open the browser developer tools, go to the application tab, and look at the cookies in the storage section. The relevant cookies you're looking for are loginID and session.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bakape/meguca/issues/1273#issuecomment-778409799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB347MDWX2ELJK3PVSKUD7LS6V7UZANCNFSM4XLW5FGQ .

MCMXCIII commented 3 years ago

I aint seeing no cookies at all I have a video for you as well.

https://user-images.githubusercontent.com/31150823/107860647-62bbbb80-6e0e-11eb-9121-9782d529c881.mp4

bakape commented 3 years ago

Yeah, we did have changes in cookie setting recently. This is a bug. Perhaps the cause is being on port 8000. I'll look into this.

bakape commented 3 years ago

Tried on a fresh container - can't reproduce.

@MCMXCIII Could you post the response headers of the /api/login request? Should be something like this Screenshot_20210221_204626

MCMXCIII commented 3 years ago

Trying this on a fresh container in docker.

MCMXCIII commented 3 years ago

I tried in a new container and still nothing. @bakape I am not sure if this means much but I am using v6. Should I be using another version?

I will follow this up with a video in a few hours of exactly what I am doing.

Thanks for your help.

MCMXCIII commented 3 years ago

Tried on a fresh container - can't reproduce.

@MCMXCIII Could you post the response headers of the /api/login request? Should be something like this Screenshot_20210221_204626

This returns a 404 for me???

Kamuso commented 3 years ago

@MCMXCIII

This returns a 404 for me???

You aren't meant to navigate to that url. You need to open the developer tools again and go to the network tab. Make sure you have the "Preserve log" checkbox near the top enabled. Try logging in again with the network tab open and look for the entry named login. Click on it and look for the response header. network

I think it would also be helpful if you ran git log from the meguca source directory, so we can see if you're running an up-to-date version of v6.

MCMXCIII commented 3 years ago

Checking this now

MCMXCIII commented 3 years ago

Sorry for the late reply after checking I don't have a login entry.

MCMXCIII commented 3 years ago

Actually I found it here

Login Cookie

MCMXCIII commented 3 years ago

@Kamuso @bakape can you show me what the admin panel is supposed to look like?

Kamuso commented 3 years ago

Yeah that's the cookies on http issue. It's already been fixed, so update your v6 branch. It might also be a good idea to use https from now on.

can you show me what the admin panel is supposed to look like?

The panel where you log in gets changed to this. Also if the account has moderation privileges, the panel at the bottom right appears. image

MCMXCIII commented 3 years ago

Thanks for fixing this! Marking this as closed.