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

swastika avatars #14799

Closed
5 tasks
davidak opened this issue Feb 25, 2021 · 11 comments · Fixed by #17707
Closed
5 tasks

swastika avatars #14799

davidak opened this issue Feb 25, 2021 · 11 comments · Fixed by #17707

Comments

@davidak
Copy link

davidak commented Feb 25, 2021

Description

The swastica was used by the german fascist movement. Later, it was the sign of the right-wing german party NSDAP and the third reich. Now it's legally forbidden to use this sign in germany (Strafgesetzbuch § 86a). It's also called „Hakenkreuz“ in germany.

Even this anti-fascist sign was long forbidden until a court decided that it is legal.

https://de.wikipedia.org/wiki/Swastika#/media/Datei:Anti-Nazi-Symbol.svg

The gitea avatar algorithm sometimes creates geometric shapes that could get recognised as swasticas. Therefore gitea could be considered illegal in germany.

That might sound a bit crazy and you could argue that it's just random geometric shapes, but it's a highly sensitive topic in germany and probably someone will show up and call you a fascist if you try to argue about it. I find it kind of ironic, because probably no one getting this random avatar is actually a fascist, but other people might be more sensitive.

So you might consider using a different algorithm for the avatar creation.

Related issue:

It was also noticed in social media: https://social.tchncs.de/@cark/105651953031693352

Screenshots

4b49d4114ff3cb83475e5db5164494e6 b3ed110ab76b8cfd207377b5f07405cf 18fbbeaff4f0b7fa5d43cb0f8327372c 38eb51f7be21116d19acbc5a95f1bf4b 42e65d0b91208734ffa8a292479c0bc0 92ae996e87b6998b63bbc9092ec00b2a 857c04e3f1b9474742353a6420523ebf 951b52225ed1cbc595bd385c34f86578 3374c6f251ca3cfc9bd62a3f5b691e0b 5297b7c29a26c21151865e9539955e43 95440b7510aec8cf685ae7511b070d26 3689970e59c0c837adb50d6f39c11114 624453464ba38ab46180567a1f4bdc93 d99585829753c5d8ce95639a79b823aa c73b6bd648d00da1ebfd61753672d0e0

6489c9467cc0ef15273aadd9784243ff 6489c9467cc0ef15273aadd9784243ff-2 41105 41145 c96c86ae2b934966fa0b070d75121b64 a3d8d438cbc331492c311c24326d2ba5 ad864034c5e750fccda5cadc1b69a701

@noerw
Copy link
Member

noerw commented Feb 25, 2021

Legally this is not an issue I believe, as only the specific original symbol is banned afaik, not approximations thereof.
Socially I agree, I felt uneasy looking at some generated avatars in the past.

Pointing to https://codeberg.org/codeberg/avatars, which should be possible to integrate into mainline gitea

@6543
Copy link
Member

6543 commented Feb 25, 2021

@6543
Copy link
Member

6543 commented Feb 25, 2021

if using codeberg/avatars ... github.com/ajstarks/svgo can be used to convert svg to an image witch is needed ...

more...

@davidak davidak changed the title swastica avatars swastika avatars Feb 25, 2021
@arogge
Copy link

arogge commented Feb 25, 2021

I just stumbled across this issue.
Being a German myself, I can tell you that I had not recognized any of the above screenshots to contain a swastika if nobody had told me what to see. I'm completely sure none of the images presented is a legal issue in Germany.

In fact only two of the images contain a structure that looks at least remotely like a swastika to me. However, I'm sure there are people that are probably a lot more sensitive than me, when it comes to this.
To overexaggerate this: displaying random images to a user is a Rorschach test. If you show a lot of random images to a lot of people, somebody will recognize something they don't like.

As you will probably always run into some kind of issue with randomly generated images, the only real solution is probably to either provide a button to re-generate the avatar with another random seed if desired or to not to random-generate them, but to use a set of pre-generated and handpicked avatar images.

Just to add a bit more (completely biased) personal opinion: I like the idea of random avatar images. It is a lot better to have distinguishable random avatars instead of a single default avatar.

@arogge
Copy link

arogge commented Feb 25, 2021

I just took a look at the DiceBear avatars. While I personally think they look great, I believe they have a lot more trigger-potential than the currently implmented random generation.

@jolheiser
Copy link
Member

I would like to copy a comment from @techknowlogick in CodeBerg/Community#394.

I've ported several avatar generating libraries to golang. Once we get 1.14.0-rc1 out I will start on a PR that'll allow swapping out of the default avatar generation library.

src.techknowlogick.com/monster-id
src.techknowlogick.com/wavatars
src.techknowlogick.com/retricon

I think allowing the avatar generator to be chosen on install (and/or changed in config) would be sufficient for a host to choose whatever suits their use-case.

@zeripath
Copy link
Contributor

This argument essentially boils down to any object with rotational symmetry order 4 and without mirror symmetry is a swastika.


The avatars are generated using:

https://github.com/issue9/identicon

Looking at the code this appears to build its avatars with deliberate 4th order rotational symmetry

It would not be hard to change:

https://github.com/issue9/identicon/blob/99644285dc221b04fde804663f754891d8759b46/identicon.go#L116-L144

func drawBlocks(p *image.Paletted, size int, c, b1, b2 blockFunc, angle int) {
	// 每个格子的长宽。先转换成 float,再计算!
	blockSize := float64(size) / 3
	twoBlockSize := 2 * blockSize

	incr := func() { // 增加 angle 的值,但不会大于 3
		angle++
		if angle > 3 {
			angle = 0
		}
	}

	c(p, blockSize, blockSize, blockSize, 0)

	b1(p, 0, 0, blockSize, angle)
	b2(p, blockSize, 0, blockSize, angle)

	incr()
	b1(p, twoBlockSize, 0, blockSize, angle)
	b2(p, twoBlockSize, blockSize, blockSize, angle)

	incr()
	b1(p, twoBlockSize, twoBlockSize, blockSize, angle)
	b2(p, blockSize, twoBlockSize, blockSize, angle)

	incr()
	b1(p, 0, twoBlockSize, blockSize, angle)
	b2(p, 0, blockSize, blockSize, angle)
}

To break this symmetry by changing the angle placed in each corner from 0,1,2,3 to 0,1,3,2 instead.


Now my initial review of the code of this library is not entirely favourable - however, this is a question of developer effort and time spent looking for a new avatar library.

@CoderBuddhist
Copy link

@davidak can you please stop insult my religion?

Just like the Hindus, the Buddhists also used the swastika to mark the beginning of Buddhist texts as they consider it a symbol of universal harmony, prosperity, plurality, good luck, abundance, dharma, fertility, long life, and eternity. In different parts of the world, the swastika is given a different meaning by the Buddhist. For instance, In Tibet, the swastika was a graphical representation of eternity. There are 65 auspicious symbols on the footprint of the Buddha and the swastika is considered as the first one. You can also find the swastika symbol imprinted on the body, palms, chest, or feet of Buddha. It is used to mark the beginning of sacred texts or as a clothing decoration. The Buddhists in India, consider swastika as “The Seal on Buddha’s Heart.”
From ancient times, Swastika is considered noble, which is prominent in most cultures throughout history. It is also the most liked symbol of Aryans.

@jolheiser
Copy link
Member

I'm going to go ahead and lock this discussion.

Further discussion can perhaps be moved to issues regarding new avatar generation libraries to add, or changing the parameters we use for identicon.

I think adding options would be a nice idea regardless the motivation, and I think that should also cover the use-cases presented.

@go-gitea go-gitea locked and limited conversation to collaborators Feb 26, 2021
@lafriks
Copy link
Member

lafriks commented Feb 26, 2021

This could be replacement option: https://github.com/o1egl/govatar

@wxiaoguang
Copy link
Contributor

Please have a look at:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants