Skip to content

Explain how to provide a stack trace #7875

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

Merged
merged 4 commits into from
May 17, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions contributing/code/bugs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Before submitting a bug:
* Double-check the official :doc:`documentation </index>` to see if you're not misusing the
framework;

* Ask for assistance on `Stack Overflow`_ or on the #symfony `IRC channel`_
if you're not sure if your issue is really a bug.
* Ask for assistance on `Stack Overflow`_ on the #symfony `IRC channel`_, or on
the #support channel of `the Symfony Slack`_ if you're not sure if your issue
is really a bug.

If your problem definitely looks like a bug, report it using the official bug
`tracker`_ and follow some basic rules:
Expand All @@ -32,9 +33,20 @@ If your problem definitely looks like a bug, report it using the official bug
* Give as much detail as possible about your environment (OS, PHP version,
Symfony version, enabled extensions, ...);

* If you want to provide a stack trace you got on an html page, be sure to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd recommend the opposite: always share the stack traces as images because they offer some protection against Google, etc. Remember that traces can contain sensitive information, so we don't make them searchable on Internet.

Copy link
Contributor Author

@greg0ire greg0ire May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO sensitive data is the exception, not the rule, and a big drawback of using them that I did not mention is that you can't copy paste from them, making the work harder for people who want to check files mentioned in it. Also, these images can be resized if too big, which can make the text illegible. Also if not cropped properly, they might contain even more sensitive data, like what the desktop of the reporter looks like. Finally, even with a screenshot, you should redact sensitive information, so...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you expose sensitive information you are already F**ked, posting this in a screenshot will not prevent anyone from abusing this information. Not to mention that search engines can perform OCR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also for plain text, because it allows search engines to match exception messages that people encounter, so they may be redirected to the correct issue just by googling the exception itself

provide the plain text version, which should appear at the bottom of the
page. *Do not* provide it as a screenshot, since search engines will not be
able to index the text inside them. Same goes for errors encountered in a
terminal, do not take a screenshot, but learn how to copy/paste from it. If
the stack trace is long, consider enclosing it in a `<details> html tag`_.
**Be wary that stack traces may contain sensitive information, and if it is
the case, be sure to redact them prior to posting your stack trace.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/redact/remove/

Copy link
Contributor Author

@greg0ire greg0ire May 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with "redact"? IMO it's very appropriate in this context (I'm saying that because I've seen a lot of "redacted" out there, didn't you?).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean remove instead of redact?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I did not but you are the second person to ask me that, so let me check the meaning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see both of you are french so maybe you're just unaware that redact is a faux-ami ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I didn't know the meaning of redact. 😅 Maybe you should simply write edit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did know the meaning of "redact" so it didn't shocked me 🤣

Even though, if some people are confused, maybe the word should be changed without breaking the global understanding of the paragraph. Not every Symfony user is english-native 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexislefebvre edit does not convey the full meaning, and I don't think we should dumb it down with remove. I think people can easily infer the meaning of the word if they don't know it already, and that means they will have learned something, so IMO it's better to stick with that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 then


* *(optional)* Attach a :doc:`patch <patches>`.

.. _`Stack Overflow`: http://stackoverflow.com/questions/tagged/symfony2
.. _IRC channel: https://symfony.com/irc
.. _the Symfony Slack: https://symfony.com/slack-invite
.. _tracker: https://github.com/symfony/symfony/issues
.. _Symfony Standard Edition: https://github.com/symfony/symfony-standard/
.. _<details> html tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details