ivatar issueshttps://git.linux-kernel.at/oliver/ivatar/-/issues2021-09-06T12:18:16Zhttps://git.linux-kernel.at/oliver/ivatar/-/issues/85Matrix contact details2021-09-06T12:18:16ZGhost UserMatrix contact detailsSince I didn't manage to fork the project on this gitlab instance due to project restrictions, I just provide this handy patch, that should provide an updated version of the contact page.
It's a first draft, so feel free to criticise an...Since I didn't manage to fork the project on this gitlab instance due to project restrictions, I just provide this handy patch, that should provide an updated version of the contact page.
It's a first draft, so feel free to criticise and adjust :)
[0001-Add-newer-version-of-matrix-contact-page.patch](/uploads/7c01d8cd8d94e357b463fc380b650ef6/0001-Add-newer-version-of-matrix-contact-page.patch)Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/77Check ID form: email not normalized for sha2562021-09-06T12:18:02ZGhost UserCheck ID form: email not normalized for sha256I just noticed that depending on the casing of the email address, the sha256 icon is found or not, when using the [check form on libravatar.org](https://www.libravatar.org/tools/check/)
Using `test@example.com` vs `Test@example.com` **s...I just noticed that depending on the casing of the email address, the sha256 icon is found or not, when using the [check form on libravatar.org](https://www.libravatar.org/tools/check/)
Using `test@example.com` vs `Test@example.com` **should not** cause different sha256 hashes to be produced. And **does not** cause different md5 hashes.Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/83Verification links not working2021-09-06T12:18:00ZGhost UserVerification links not workingWhen adding a new email address on my install, the verification links don't seem to work. The links have a different hash than the database table. When I take the hash from the database and use it in the link, it works. I tested this ...When adding a new email address on my install, the verification links don't seem to work. The links have a different hash than the database table. When I take the hash from the database and use it in the link, it works. I tested this using both the SQLite and PostgreSQL options.Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.at2021-04-16https://git.linux-kernel.at/oliver/ivatar/-/issues/73Create an avatar maker2021-09-06T12:17:56ZGhost UserCreate an avatar makerTo be able to create your own avatar to host on Libravatar it would be nice with an own avatar maker directly on the website.
The avatar maker could have a web UI that lets you create your own avatar. The avatar could also be stored in ...To be able to create your own avatar to host on Libravatar it would be nice with an own avatar maker directly on the website.
The avatar maker could have a web UI that lets you create your own avatar. The avatar could also be stored in a format that can be fed to the avatar maker. It could output SVG and export to PNG.
Things could be rendered in layers:
- Layer 1: The background
- Layer 2: Skin tone
- Layer 3: Eyes, nose, mouth
- Layer 4: Hair
- Layer 5: Glasses, hat, shirt
# Avatar description language
An avatar description language based on JSON or XML could be defined. It could be documented, a specification could be written, maybe even standardized. The data could be fed to the Libravatar avatar maker as well as other third-party avatar makers, games and animation software which could render it in 3D or animated.
## Example format
```json
{
"skinTone": 1,
"eyebrowColor": "brown-200",
"eyebrowShape": 7,
"eyeColor": "green-500",
"eyeShape": 5,
"eyeSize": "m",
"lipColor": "red-300",
"lipSize": "m",
"noseShape": 3,
"noseSize": "m",
"shirtColor": "grey-700",
"background": "wall-2",
"mood": "happy"
}
```
## JavaScript
You could pass the format to a JavaScript library that renders it to either a SVG element or to a `<canvas>` element.
```javascript
const element = document.getElementById('output');
let libravatar = new Libravatar();
libravatar.load(example_data);
libravatar.render(element);
```
### JavaScript API
- `load(obj)` - Load avatar object.
- `export_png()` - Returns a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) object containing the avatar in PNG format.
- `export_svg()` - Returns a `Blob` object containing the avatar in SVG format.
- `setEyebrowColor(value)` - Sets the eyebrow color.
- `setEyeColor(value)` - Sets the eye color.
## React
There could be a React component.
```jsx
<Avatar
skinTone="1"
eyebrowColor="brown-200"
eyebrowShape="7"
eyeColor="green-500"
eyeShape="5"
eyeSize="m"
lipColor="red-300"
lipSize="m"
noseShape="3"
noseSize="m"
shirtColor="grey-700"
/>
```
## Get avatar using URL
You could base64 encode the JSON object and pass it as a query parameter.
```http
GET /avatar?data=ewogICAgInNraW5Ub25lIjogMSwKICAgICJleWVicm93Q29sb3IiOiAiY... HTTP/1.1
```Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/81No module named 'PIL2021-09-06T12:17:47ZGhost UserNo module named 'PILWhen installing on my RaspberryPi, I get this error when running `pip install -r requirements.txt`
```
ERROR: Command errored out with exit status 1:
command: /opt/ivatar/ivatar/.virtualenv/bin/python3 -c 'import sys, setuptools, to...When installing on my RaspberryPi, I get this error when running `pip install -r requirements.txt`
```
ERROR: Command errored out with exit status 1:
command: /opt/ivatar/ivatar/.virtualenv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-9qiryzy2/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-9qiryzy2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ofy7p5ap
cwd: /tmp/pip-req-build-9qiryzy2/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-9qiryzy2/setup.py", line 4, in <module>
import Identicon
File "/tmp/pip-req-build-9qiryzy2/Identicon/__init__.py", line 6, in <module>
from PIL import Image, ImageDraw
ModuleNotFoundError: No module named 'PIL'
----------------------------------------
WARNING: Discarding git+https://github.com/flavono123/identicon.git. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/80No confirmation email2021-09-06T12:17:40ZGhost UserNo confirmation emailHello there,
I am using this service for a while now,
when I use google, yahoo ..etc email, it's completely fine, I can just ask for a confirmation email, and done.
But this can't be done with "@outlook" email.
I have checked the inbox a...Hello there,
I am using this service for a while now,
when I use google, yahoo ..etc email, it's completely fine, I can just ask for a confirmation email, and done.
But this can't be done with "@outlook" email.
I have checked the inbox and junk as well.
Thank you.Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/66libravatar disable upload new photo when user reached max allowed photos limit2021-09-06T11:54:36ZGhost Userlibravatar disable upload new photo when user reached max allowed photos limitFrom libravatar IRC:
```
18:20:10 opal | suggestion: disable the "upload new photo" button if user has reached max allowed photos
18:20:26 opal | its annoying to go through the upload process only to find out it wouldnt have worked a...From libravatar IRC:
```
18:20:10 opal | suggestion: disable the "upload new photo" button if user has reached max allowed photos
18:20:26 opal | its annoying to go through the upload process only to find out it wouldnt have worked anyway
```Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/59Email in settings is not editable2021-09-06T11:54:03ZGhost UserEmail in settings is not editableGo to `/accounts/pref/`
There is only one option - email, and you can't edit it
Maybe change it to a select with verified emailsGo to `/accounts/pref/`
There is only one option - email, and you can't edit it
Maybe change it to a select with verified emailsWinter Sprint 2022Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/57Add CORS headers to returned avatars2021-09-06T11:53:49ZGhost UserAdd CORS headers to returned avatarsHello! :wave:
Could you consider adding CORS header (`Access-Control-Allow-Origin: *`) to avatar image responses? Gravatar uses it and it allows fetching avatars without cookies or any other tracking information through `<img src="..."...Hello! :wave:
Could you consider adding CORS header (`Access-Control-Allow-Origin: *`) to avatar image responses? Gravatar uses it and it allows fetching avatars without cookies or any other tracking information through `<img src="..." crossorigin=anonymous>`
More details here: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes
Reported here: https://photog.social/users/libravatar/statuses/102265339201031638Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/55Check tool, compatiblity with previous version2021-09-06T11:53:40ZGhost UserCheck tool, compatiblity with previous versionHello,
Our wiki and probably external documents mention the old check tool under the following URL: https://www.libravatar.org/tools/check_domain.
Can we provide a redirect to the new one ?
Regards.Hello,
Our wiki and probably external documents mention the old check tool under the following URL: https://www.libravatar.org/tools/check_domain.
Can we provide a redirect to the new one ?
Regards.Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/54Problem in PIL/Image.py2021-09-06T11:53:33ZGhost UserProblem in PIL/Image.pyHello!
in error.log we have lots of errors that goes like this:
```
[Mon Mar 04 01:56:23.783813 2019] [wsgi:error] [pid 20992:tid 140345052468992] """)
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
...Hello!
in error.log we have lots of errors that goes like this:
```
[Mon Mar 04 01:56:23.783813 2019] [wsgi:error] [pid 20992:tid 140345052468992] """)
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
File "/mnt/data/.virtualenv/lib/python3.6/site-packages/PIL/Image.py", line 614, in __del__
NameError: name 'hasattr' is not defined
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
File "/mnt/data/.virtualenv/lib/python3.6/site-packages/PIL/Image.py", line 614, in __del__
NameError: name 'hasattr' is not defined
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
File "/mnt/data/.virtualenv/lib/python3.6/site-packages/PIL/Image.py", line 614, in __del__
NameError: name 'hasattr' is not defined
```
Would it be possible to fix somehow?
These are not the only errors but the other seems to be a problem in deployment related to deprecation of psycopg2 wheel package. I need to take a look at it.https://git.linux-kernel.at/oliver/ivatar/-/issues/52No Identica importer2021-09-06T11:53:25ZGhost UserNo Identica importerHello,
While reading the old [photo importers](https://github.com/libravatar/wiki.libravatar.org/commit/89804fc50d4ae61c8bc31daed8254cb0fdaaf66c) page I discovered the previous version of Libravatar had support for automatic import of p...Hello,
While reading the old [photo importers](https://github.com/libravatar/wiki.libravatar.org/commit/89804fc50d4ae61c8bc31daed8254cb0fdaaf66c) page I discovered the previous version of Libravatar had support for automatic import of picture from the Identica micro-blogging platform.
Nobody complained about it so far so we should just document this regression somewhere.Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/51Libravator logo link in wiki is broken2021-09-06T11:53:18ZGhost UserLibravator logo link in wiki is brokenIn the [wiki](https://wiki.libravatar.org) there was a link to a Libravatar logo, which is currently broken. It points to https://seccdn.libravatar.org/nobody/256.png.In the [wiki](https://wiki.libravatar.org) there was a link to a Libravatar logo, which is currently broken. It points to https://seccdn.libravatar.org/nobody/256.png.https://git.linux-kernel.at/oliver/ivatar/-/issues/50Cache-Control and Expires2021-09-06T11:53:10ZGhost UserCache-Control and ExpiresWhen setting up a localhost caching reverse proxy I noticed that libravatar.org doesn't set the `Cache-Control` (and `Expires`) header.
Gravatar sets
```http
Cache-Control: max-age=300
```
Should libravatar use something similar?
T...When setting up a localhost caching reverse proxy I noticed that libravatar.org doesn't set the `Cache-Control` (and `Expires`) header.
Gravatar sets
```http
Cache-Control: max-age=300
```
Should libravatar use something similar?
The [libravatar API](https://wiki.libravatar.org/api/) only mentioned caching in relation to SRV records (1 day = 24 hour?). Should avatars itself be allowed to be cached for 24 hours?
In @tastytea's [libravatarserv](https://schlomp.space/tastytea/libravatarserv) example config for nginx the `Expires` and `Cache-Control` are set to 86400 (24 hours) (+ `Cache-Control` adds `public`):
<https://schlomp.space/tastytea/libravatarserv/src/commit/de7e61a2fed91c0be3ab787907ff39f7f72b4043/doc/nginx-example.conf#L12-L14>
Since the libravatar api very much rely on query string it's affected by <https://httpd.apache.org/docs/trunk/caching.html#http-caching>, under "What Can be Cached?":
> If the URL included a query string (e.g. from a HTML form GET
> method) it will not be cached unless the response specifies an
> explicit expiration by including an "Expires:" header or the
> max-age or s-maxage directive of the "Cache-Control:" header, as
> per RFC2616 sections 13.9 and 13.2.1.
I suppose this might affect caching in clients? I haven't checked that.
Using [mod_expires](https://httpd.apache.org/docs/2.4/mod/mod_expires.html) I used something like:
```apache
ExpiresActive On
ExpiresDefault "A86400"
Header merge "Cache-Control" "public"
```
(Maybe
```apache
ExpiresDefault "access plus 24 hours"`
```
is a bit more readable.)https://git.linux-kernel.at/oliver/ivatar/-/issues/49Content-Type should be "image/jpeg", not "image/jpg"2021-09-06T11:53:02ZGhost UserContent-Type should be "image/jpeg", not "image/jpg"The following:
```console
curl -I "https://seccdn.libravatar.org/avatar/63a75a80e6b1f4adfdb04c1ca02e596c?s=72&d=monsterid"
```
result in:
```http
HTTP/1.1 200 OK
Date: Wed, 27 Feb 2019 13:42:43 GMT
Server: Apache/2.4.34 (Fedora) Open...The following:
```console
curl -I "https://seccdn.libravatar.org/avatar/63a75a80e6b1f4adfdb04c1ca02e596c?s=72&d=monsterid"
```
result in:
```http
HTTP/1.1 200 OK
Date: Wed, 27 Feb 2019 13:42:43 GMT
Server: Apache/2.4.34 (Fedora) OpenSSL/1.1.0i-fips mod_wsgi/4.5.20 Python/3.6
Strict-Transport-Security: max-age=31536000; preload; includeSubDomains
Content-Length: 2210
Vary: Accept-Language,Cookie
Content-Language: en
X-Frame-Options: SAMEORIGIN
Content-Type: image/jpg
```
I suppose `Content-Type` should be `image/jpeg`Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/48Retro images have a margin on the bottom and right sides2021-09-06T11:52:52ZGhost UserRetro images have a margin on the bottom and right sidesThe image generated with the default=retro option have a margin or internal border of some sort:
Example:
https://www.libravatar.org/avatar/13294c5d1d80d103b665a3596a7ed975e75e356b5b6af178eaf097b7c3130bf3?s=60&forcedefault=y&default=re...The image generated with the default=retro option have a margin or internal border of some sort:
Example:
https://www.libravatar.org/avatar/13294c5d1d80d103b665a3596a7ed975e75e356b5b6af178eaf097b7c3130bf3?s=60&forcedefault=y&default=retro
Attached here:
![retro](/uploads/1b7d7c0e858be5b6128382ce3b6c4ddd/retro.png)https://git.linux-kernel.at/oliver/ivatar/-/issues/47check tool doesn't display SHA256 avatars (email)2021-09-06T11:52:45ZGhost Usercheck tool doesn't display SHA256 avatars (email)I use my own libravatar server. The check tool does display the MD5 picture, but not the SHA256 picture. You can replicate with the email address `testlibravatar@tastytea.de`. The server returns the right image¹ and it worked with the ol...I use my own libravatar server. The check tool does display the MD5 picture, but not the SHA256 picture. You can replicate with the email address `testlibravatar@tastytea.de`. The server returns the right image¹ and it worked with the old check tool.
¹ https://avatar.tastytea.de/avatar/926ccda19cfe96f3d714506c74ad3101e5cdfec95aaacef99b7f39242636a3b2
![screenshot_2019-02-19T22_01_31](/uploads/cd66e0f6ccc96ad0117b7c3ecd60418d/screenshot_2019-02-19T22_01_31.png)Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/46Some pictures are not resized2021-09-06T11:52:37ZGhost UserSome pictures are not resizedI checked with two different pictures:
- ![black](/uploads/3c963f7c4702d85fea7618e2cd8d9cc8/black.png) a 512x512 1-bit PNG image ;
- ![wb](/uploads/31bc0aadbabf610eda26625971a7aeed/wb.png) a 32x32 2-bit PNG image.
The first one is corr...I checked with two different pictures:
- ![black](/uploads/3c963f7c4702d85fea7618e2cd8d9cc8/black.png) a 512x512 1-bit PNG image ;
- ![wb](/uploads/31bc0aadbabf610eda26625971a7aeed/wb.png) a 32x32 2-bit PNG image.
The first one is correctly displayed as a 80x80 image when requested without the size option and again correctly resized to other size.
The second is not, ever.Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/44Valid hash with a forced default option redirects to an invalid page2021-09-06T11:52:22ZGhost UserValid hash with a forced default option redirects to an invalid pageA request for a valid hash such as `4751ed9aae86881d2b45dd0512c3e14a` with a invalid default such as `unicorn` works fine unless the forcedefault option is used. In this case ivatar redirects to an invalid page using `unicorn` as the has...A request for a valid hash such as `4751ed9aae86881d2b45dd0512c3e14a` with a invalid default such as `unicorn` works fine unless the forcedefault option is used. In this case ivatar redirects to an invalid page using `unicorn` as the hash.
A request for an invalid hash with an invalid forced default correctly returns nobody.png.
Example:
```
$ curl -i "https://libravatar-stg.fedorainfracloud.org/avatar/4751ed9aae86881d2b45dd0512c3e14a?d=unicorn&f=y"
HTTP/1.1 302 Found
Date: Tue, 19 Feb 2019 15:44:44 GMT
Server: Apache/2.4.34 (Fedora) OpenSSL/1.1.0i-fips mod_wsgi/4.5.20 Python/3.6
Strict-Transport-Security: max-age=31536000; preload
Location: unicorn
Content-Length: 0
Vary: Accept-Language,Cookie
Content-Language: en
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=utf-8
```Oliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.athttps://git.linux-kernel.at/oliver/ivatar/-/issues/43Wrong page returned for a hash of invalid length2021-09-06T11:52:07ZGhost UserWrong page returned for a hash of invalid lengthWith a short hash like 55a407f5 ivatar returns an HTML error page stating “incorrect digest length” but with an HTTP code of 200, which is confusing. Latest discussions stated libravatar implementations should do they best to return an i...With a short hash like 55a407f5 ivatar returns an HTML error page stating “incorrect digest length” but with an HTTP code of 200, which is confusing. Latest discussions stated libravatar implementations should do they best to return an image, so perhaps nobody.png should returned here. At least it should be an HTTP code 400 or such.
Example:
$ curl -i "https://libravatar-stg.fedorainfracloud.org/avatar/55a407f >
HTTP/1.1 200 OKOliver Falkoliver@linux-kernel.atOliver Falkoliver@linux-kernel.at