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

Added Test::Mojo::csrf_token and Test::Mojo::session methods #640

Closed
wants to merge 4 commits into from
Closed

Added Test::Mojo::csrf_token and Test::Mojo::session methods #640

wants to merge 4 commits into from

Conversation

alexbyk
Copy link

@alexbyk alexbyk commented Jul 1, 2014

Hi. I've created that functionality for testing secure applications for my own purposes. But may be someone will find it worth for himself.

@kraih
Copy link
Member

kraih commented Jul 1, 2014

👎 from me, it doesn't feel right, those methods are not actual tests and i never had the need to test sessions this way.

@@ -562,6 +603,12 @@ Check response C<Content-Type> header for similar match.

Opposite of L</"content_type_like">.

=head2 csrf_token

$token = $t->csrf_token;
Copy link
Member

Choose a reason for hiding this comment

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

Formatting is wrong. (missing my)

@alexbyk
Copy link
Author

alexbyk commented Jul 1, 2014

So it's better to keep that methods in my own submodule, isn't it?

@kraih
Copy link
Member

kraih commented Jul 1, 2014

@alexbyk I think so.

@kraih
Copy link
Member

kraih commented Jul 1, 2014

@alexbyk Perhaps you should have tried discussing it on IRC or the mailing list first, to see if there is broader interest before putting it up for a vote here.

@alexbyk
Copy link
Author

alexbyk commented Jul 1, 2014

@kraih I'm not good in discussing things (maybe because my English is bad). Also I don't think that democracy is the right way to decide are my features worth to be committed in the main code or not.

In my application most of post requests are protected from csrf, users can sign in and so on..., so I need those methods very often. But if you think that they are unnecessary - maybe you're right.

Also as you noticed they differ a little from other methods (they don't do tests). (but on the other side reset_session doesn't do any tests as well, and that isn't a problem).

@kraih
Copy link
Member

kraih commented Jul 1, 2014

I can only speak for myself, but the two things that make me vote 👍 are usually 1) that i want to use the feature myself, or 2) that there is broad interest in the community. Since there doesn't appear to be much interest at the moment, i'm going to close his pull request for now, if that changes i'll reopen it.

@kraih kraih closed this Jul 1, 2014
@alexbyk alexbyk deleted the test_mojo branch July 3, 2014 05:02
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

Successfully merging this pull request may close these issues.

None yet

2 participants