예약된 사용자 이름에 'anonymous*'를 추가하면 익명 모드에서 'AnonymousXX' 이름 구조 생성이 차단됩니다

Continuing the discussion from How to anonymise a single post?:

I tried this just now, and the anonymous user created for the user was 20-character set of seemingly random alphanumeric characters beginning with cb426… I had expected it to be in the format “anonymous99” or “anonymous100”.

Is this a bug or am I doing something the wrong way?

2개의 좋아요

I have just impersonated a test user and then entered anonymous mode and the name generated is in the anonymousNN style.

Is this something you can replicate on more than one account?

1개의 좋아요

Yes, it’s the same (albeit a different random username) for another user I tried it with.

I’m using 2.9.0.beta10 (0c38757250).

2개의 좋아요

I wonder whether I have anonymous mode enabled for TL1+ and was trying to impersonate/anonymise a TL0 user. I’ll check later.

1개의 좋아요

I made sure that allow anonymous posting was set, that anonymous posting min trust level was 0, created a brand new user, logged in as that user (not impersonating), entered anonymous mode, and the username created was…

30d844ebb6818fcb7eab

So it’s something about anonymising on its own, rather than just when impersonating. I’ll change the title of this topic from Anonymous user created when impersonating user doesn’t begin with “anonymous” to something more accurate.

P.S. still 2.9.0.beta10 (0c38757250)

Do you have a lot of anonymous users?

I think this was fixed at the time, but there may have been a regression?

1개의 좋아요

Just over a dozen, plus four of these 20-random-character users in the last fortnight or so.

The person it cropped up for had created a real username “Anonymous20” when the next anonymised name would have been “anonymous20” (I can’t remember the actual number).

(I then renamed him and added “anonymous” to the list of words you can’t use in a username.)

Could that be relevant?

1개의 좋아요

This sounds promising. Let me check on my test site. :+1:

1개의 좋아요

Cheers. Looking at it, to reserved usernames I added anonymous and anonymous*

I’ve just removed those two additions, and it all works fine again! Thanks for pointing me to the old topic which made me think of this.

It would still be good to prevent users from creating accounts with the word “anonymous” in it, but still have anonymous mode work properly. I guess this is still a bug.

1개의 좋아요

It’s the anonymous* that’s the culprit:

The user_name_suggester checks the reserved names before allocating one, so adding that will be what’s gumming it up: :+1:

1개의 좋아요

Thanks for clarifying this.

Maybe it would be better for Discourse to check reserved usernames but ignore any prohibition on the word “anonymous” when creating an anonymous user.

1개의 좋아요

Discourse의 익명 모드에 의해 생성된 경우를 제외하고, 사용자 이름에서 "Anonymous"라는 단어가 사용되는 것을 방지하고 싶습니다.

이전에는 위에서 언급한 문제(즉, 사용자가 "Anonymous"를 사용하는 것을 방지하면 Discourse의 익명 모드도 이를 사용할 수 없게 되는 문제) 때문에 이것이 불가능했습니다.

그 이후로 상황이 변경되었나요?