Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

400 Error #80

Closed
Entkenntnis opened this issue Feb 28, 2021 · 6 comments
Closed

400 Error #80

Entkenntnis opened this issue Feb 28, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@Entkenntnis
Copy link
Member

When I visit https://de.serlo.org/70696, I get a very strange redirect:

https://de.serlo.org/rs%00%00%00%00%00%00/70696/proteine-aufbau-und-funktion

@kulla kulla transferred this issue from serlo/cloudflare-worker Mar 1, 2021
@kulla kulla added the bug Something isn't working label Mar 1, 2021
@kulla
Copy link
Member

kulla commented Mar 1, 2021

CF uses the alias it gets from the api:

2021-03-01-174348_990x237_scrot

When I look at the URL I guess it's another example of the weird bug we have. %00 is the null character and this character should never occur in a string. Since the api only forwards the alias it gets from the database layer I guess the bug is in the database layer.

I added an empty edit by visiting https://de.serlo.org/entity/repository/add-revision/70696 in hope the new edit will overwrite the cache entry for this alias in the api (since malformed cache entries can be fixed by refetching them from the database layer) but it did not helped...

@kulla
Copy link
Member

kulla commented Mar 1, 2021

Okay, I just made an edit with a real change and now the api response is right:

2021-03-01-175946_975x232_scrot

@dal Can you check whether https://de.serlo.org/70696 works for you?

@kulla
Copy link
Member

kulla commented Mar 1, 2021

Okay, there might be a bug with deleting a cache key in CF. I need to check this in an hour again... after the cache key expired in CF it should work again...

@kulla
Copy link
Member

kulla commented Mar 1, 2021

The redirect of de.serlo.org/70696 is fixed now (I guess due to my edit and the following new setting of the cache entry in the api). As I said, I guess this is another example for the weird bug @inyono is looking for to fix in the database layer.

The weird part for me is that the pathname /rs%00%00%00%00%00%00/70696/proteine-aufbau-und-funktion has the right structure. In case of a malfunction I would assume the whole pathname to be not usable. Here only the subject prefix is malformed. It seems to me, that only https://github.com/serlo/serlo.org-database-layer/blob/0f45e0111e103e9c0ea5c0dcc999dd5794e48c40/src/uuid/model/entity/mod.rs#L183 returned a malformed value. Might it be, that here a value in the memory is read which is not set properly before?

@kulla
Copy link
Member

kulla commented Mar 1, 2021

@inyono Feel free to close this issue. I am not sure whether this issue is helpful or not...

@inyono
Copy link
Member

inyono commented Mar 5, 2021

Closing because not reproducible.

@inyono inyono closed this as completed Mar 5, 2021
kulla added a commit to serlo/api.serlo.org that referenced this issue Mar 23, 2021
kulla added a commit to serlo/api.serlo.org that referenced this issue Mar 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants