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

An error occured while processing your /site/view-revision request #4

Closed
alder opened this issue Dec 13, 2011 · 8 comments
Closed

An error occured while processing your /site/view-revision request #4

alder opened this issue Dec 13, 2011 · 8 comments

Comments

@alder
Copy link

alder commented Dec 13, 2011

Steps to reproduce:

  1. Change id for view-revision URL. Example: http://74.207.228.11/site/view-revision?id=4+4546
  2. Got Internal Server Error.

Details:
junk in string "4 4546"

P.S. Also this happens while processing /site/compare-revisions request. See - http://74.207.228.11/site/compare-revisions?old=4+4537&diff=44538

@vsedach
Copy link
Collaborator

vsedach commented Dec 14, 2011

This is the intended behavior.

@vsedach vsedach closed this as completed Dec 14, 2011
@andy128k andy128k reopened this Dec 14, 2011
@alder
Copy link
Author

alder commented Dec 14, 2011

Much better behavior is 404 error. Not 500, not application code.

@andy128k
Copy link
Collaborator

Well designed 404 page have to be shown. Not 'server error'.

@vsedach
Copy link
Collaborator

vsedach commented Dec 15, 2011

There are 404 pages for articles and accounts. Revision IDs are permanent (except for "permanently deleted" pages ie spam) - if there is an error in viewing revisions or comparing them, then there is either an error in the URL or a serious server error. So 500 is the right behavior. All 500 pages return a stack trace to make error reporting easier.

@vsedach vsedach closed this as completed Dec 15, 2011
@andy128k
Copy link
Collaborator

Ошибка валидации не должна приводить к 500 никогда.
Почитай что ли книжку. 4xx -- ошибка клиента. 5xx -- ошибка сервера.

P.S. С таким подходом толку от этого сайта не будет.

@alder
Copy link
Author

alder commented Dec 16, 2011

Еще добавлю - на живом сайте пользователь никогда не должен видеть никаких стектрейсов. Это потенциальная уязвимость. Максимум - сообщение "Упс! Что-то пошло не так, мы уже в курсе и работаем над этим" и все ошибки логировать.

@vsedach
Copy link
Collaborator

vsedach commented Dec 17, 2011

Опять повторяю: это не ошибка валидации. Это или ошибка в базе данных, или ошибка в генерации URL. Если кто-то хочет найти уязвимость, то может спокойно прочитать код. А стек трейс упрощает дебаггинг для меня и пользователей cliki. Это же сайт для программистов.

@andy128k
Copy link
Collaborator

Пробел в url был добавлен пользователем. Он набрал url по-памяти (например).
http://cliki2-beta.cliki.net/site/view-revision?id=10000000
А это ошибка в базе или ещё где?

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

No branches or pull requests

3 participants