Coder Social home page Coder Social logo

Comments (8)

vsedach avatar vsedach commented on August 19, 2024

This is the intended behavior.

from cliki2.

alder avatar alder commented on August 19, 2024

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

from cliki2.

andy128k avatar andy128k commented on August 19, 2024

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

from cliki2.

vsedach avatar vsedach commented on August 19, 2024

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.

from cliki2.

andy128k avatar andy128k commented on August 19, 2024

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

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

from cliki2.

alder avatar alder commented on August 19, 2024

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

from cliki2.

vsedach avatar vsedach commented on August 19, 2024

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

from cliki2.

andy128k avatar andy128k commented on August 19, 2024

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

from cliki2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.