Commit Graph

12789 Commits

Author SHA1 Message Date
Jakub Kucharovic
c6eb81938b Created security.cs.xlf 2013-01-10 08:19:03 -08:00
Fabien Potencier
7ab8e48373 merged branch thunderer/security-polish-translation (PR #6674)
This PR was merged into the master branch.

Commits
-------

0b75f67 Security component Polish message translations

Discussion
----------

[Security] Polish message translations

Security component messages translated from English to Polish.
2013-01-10 17:12:04 +01:00
Fabien Potencier
b6d5be3901 merged branch theUniC/master (PR #6669)
This PR was merged into the master branch.

Commits
-------

c06e627 Fixed some typos

Discussion
----------

FIxed some typos in the Spainsh translation of the Security component messages

Hi,

In order to show the most clear and less _"robotic"_ messages in Spanish, I've fixed some typos and some incorrect translations in the Spanish translation file of the Security component.

Christian.
2013-01-10 17:11:41 +01:00
Fabien Potencier
f9ccd27af5 merged branch skoop/NL-translation-fixes (PR #6672)
This PR was merged into the master branch.

Commits
-------

e84a8d0 fixed some small issues with grammar and used terminology

Discussion
----------

fixed some small issues with grammar and used terminology
2013-01-10 17:10:56 +01:00
Fabien Potencier
955400106b merged branch peterkokot/translations (PR #6673)
This PR was merged into the master branch.

Commits
-------

d5825aa slovenian translations of security component added

Discussion
----------

Slovenian translations of security component added
2013-01-10 17:10:37 +01:00
Fabien Potencier
76fefe3537 updated CHANGELOG and UPGRADE files 2013-01-10 17:09:48 +01:00
Fabien Potencier
b954a5b132 merged branch kucharovic/master (PR #6676)
This PR was merged into the master branch.

Commits
-------

d6f972b Created Slovak translation to Security

Discussion
----------

[security][tranlation] Created Slovak translation to Security
2013-01-10 17:07:49 +01:00
Fabien Potencier
54495c8385 merged branch pilot/patch-1 (PR #6675)
This PR was merged into the master branch.

Commits
-------

e848bc5 Add Russian translations

Discussion
----------

Add Russian translations
2013-01-10 17:03:36 +01:00
Jakub Kucharovic
d6f972bc1e Created Slovak translation to Security 2013-01-10 08:01:03 -08:00
Alex Demchenko
e848bc589b Add Russian translations 2013-01-10 07:53:38 -08:00
Tomasz Kowalczyk
0b75f67ae5 Security component Polish message translations 2013-01-10 16:50:43 +01:00
unknown
d5825aac2f slovenian translations of security component added 2013-01-10 16:29:45 +01:00
Fabien Potencier
f7da1f0eb8 added some unit tests (and fixed some bugs) 2013-01-10 16:26:59 +01:00
Stefan Koopmanschap
e84a8d0106 fixed some small issues with grammar and used terminology 2013-01-10 16:22:58 +01:00
Christian
c06e627e17 Fixed some typos 2013-01-10 15:54:27 +01:00
Fabien Potencier
d600759cc9 merged branch pborreli/typo-hu (PR #6666)
This PR was merged into the master branch.

Commits
-------

9db1515 [Security] Removed extra space

Discussion
----------

[Security] Removed extra space
2013-01-10 15:46:09 +01:00
Pascal Borreli
9db1515b31 [Security] Removed extra space 2013-01-10 14:44:10 +00:00
Fabien Potencier
03c7f59d50 merged branch iambrosi/patch-1 (PR #6663)
This PR was merged into the master branch.

Commits
-------

e908a52 Fixed spanish typos

Discussion
----------

Fixed spanish typos
2013-01-10 15:42:11 +01:00
Fabien Potencier
37aca2df6e merged branch VictorMateo/patch-1 (PR #6662)
This PR was merged into the master branch.

Commits
-------

6ae8ca8 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf

Discussion
----------

Update src/Symfony/Component/Security/Resources/translations/security.es...

....xlf
2013-01-10 15:41:58 +01:00
Fabien Potencier
6f9d957b1e merged branch plebs/patch-2 (PR #6661)
This PR was merged into the master branch.

Commits
-------

9b8428d [security][tranlation]Fixed spanish translation

Discussion
----------

[security][tranlation]Fixed spanish translation
2013-01-10 15:41:50 +01:00
Fabien Potencier
cec47c80a7 merged branch inspiran/master (PR #6664)
This PR was merged into the master branch.

Commits
-------

3c4437c Added Dutch translations

Discussion
----------

	 Added Dutch translations

	 Added Dutch translations
2013-01-10 15:41:13 +01:00
Ismael Ambrosi
e908a523d3 Fixed spanish typos 2013-01-10 12:36:30 -02:00
inspiran
3c4437c975 Added Dutch translations 2013-01-10 15:34:58 +01:00
Fabien Potencier
dc109fc7a1 merged branch matteosister/security_component_italian_translations (PR #6656)
This PR was merged into the master branch.

Commits
-------

0b5177b added italian translations

Discussion
----------

added italian translations for the security component

---------------------------------------------------------------------------

by matteosister at 2013-01-10T14:22:54Z

not sure if the file should be named **security.it_IT.xlf** or **security.it.xlf**

---------------------------------------------------------------------------

by fabpot at 2013-01-10T14:25:49Z

security.it.xlf

---------------------------------------------------------------------------

by matteosister at 2013-01-10T14:31:14Z

ok, renamed the files, and squashed the pr to a single commit!
Thanks @fabpot!
2013-01-10 15:34:09 +01:00
Victor Mateo
6ae8ca8042 Update src/Symfony/Component/Security/Resources/translations/security.es.xlf 2013-01-10 15:33:04 +01:00
plebs
9b8428d44f [security][tranlation]Fixed spanish translation 2013-01-10 15:32:29 +01:00
Fabien Potencier
770271fa8c merged branch vincentaubert/master (PR #6660)
This PR was squashed before being merged into the master branch (closes #6660).

Commits
-------

45c8682 [Security][Translation]Created fr translation for Security

Discussion
----------

[Security][Translation]Created fr translation for Security

adds french translations for the security component
2013-01-10 15:29:18 +01:00
Vincent AUBERT
45c8682606 [Security][Translation]Created fr translation for Security 2013-01-10 15:29:18 +01:00
matteo giachino
0b5177b8e8 added italian translations 2013-01-10 15:28:50 +01:00
Fabien Potencier
605328d42e merged branch 1ed/patch-5 (PR #6658)
This PR was merged into the master branch.

Commits
-------

c3a6659 [Security] added Hungarian translations for exception messages

Discussion
----------

[Security] added Hungarian translations for exception messages
2013-01-10 15:26:36 +01:00
Fabien Potencier
713c284126 merged branch dmecke/patch-1 (PR #6657)
This PR was merged into the master branch.

Commits
-------

2f51961 Created de translation for Security

Discussion
----------

[Security][Translation]Created de translation for Security
2013-01-10 15:26:06 +01:00
Fabien Potencier
13640a22bd merged branch dlsniper/ro-trans (PR #6654)
This PR was merged into the master branch.

Commits
-------

e35998f Translated to Romanian

Discussion
----------

[Security] Translated to Romanian

Added Romanian version for Security messages.

Thanks!
2013-01-10 15:25:03 +01:00
Fabien Potencier
3150a065d9 merged branch AV4TAr/spanish-translation (PR #6655)
This PR was merged into the master branch.

Commits
-------

b194607 spanish translation

Discussion
----------

Security / spanish translation

Spanish Translation.
2013-01-10 15:23:48 +01:00
Gábor Egyed
c3a6659856 [Security] added Hungarian translations for exception messages 2013-01-10 06:23:20 -08:00
Daniel Mecke
2f5196161a Created de translation for Security 2013-01-10 06:19:49 -08:00
Diego Sapriza
b194607e34 spanish translation 2013-01-10 12:17:16 -02:00
Florin Patan
e35998f7fb Translated to Romanian 2013-01-10 16:16:00 +02:00
Fabien Potencier
415869bca4 merged branch rdohms/patch-7 (PR #6653)
This PR was merged into the master branch.

Commits
-------

ff5ba38 Created PT_BR translation for Security

Discussion
----------

[Security][Translation]Created PT_BR translation for Security

Added the PT_BR strings for Security strings.
2013-01-10 15:05:48 +01:00
Rafael Dohms
ff5ba380c5 Created PT_BR translation for Security
Added the PT_BR strings for Security strings.
2013-01-10 06:03:36 -08:00
Fabien Potencier
7e2d2a6b7f merged branch stof/enhance_deprecation (PR #6646)
This PR was merged into the master branch.

Commits
-------

68257d3 Enhanced the triggering of E_USER_DEPRECATED errors

Discussion
----------

Enhanced the triggering of E_USER_DEPRECATED errors

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Deprecations: no
Symfony2 tests pass: yes
Fixes the following tickets: none

- Removed useless error handlers around FormEvent as the triggering has
  been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
  method provide some user logic needing to be converted to a new way.
  For instance, AbstractType should trigger the error when the type extending it overwrites the deprecated methods instead of ``setDefaultOptions``, which was not the case previously.
- Enhanced the deprecation messages to mention the replacement whenever
  possible.

---------------------------------------------------------------------------

by stof at 2013-01-10T01:23:49Z

@fabpot should I remove ``Symfony\Component\Form\Test\DeprecationErrorHandler::getFormEvent`` ? It is not used anymore in the testsuite and is not needed anymore as the constructor of FormEvent does not trigger the deprecation erronously.

---------------------------------------------------------------------------

by fabpot at 2013-01-10T07:24:02Z

@stof: yes, remove it then. Thanks.

---------------------------------------------------------------------------

by stof at 2013-01-10T08:23:14Z

done
2013-01-10 14:43:24 +01:00
Fabien Potencier
3e99f4e976 merged branch asm89/issue-837 (PR #4935)
This PR was merged into the master branch.

Commits
-------

73db84f [Security] Move translations file to 'security' domain
324703a [Security] Switch to English messages as message keys
aa74769 [Security] Fix CS + unreachable code
2d7a7ba [Security] Fix `AuthenticationException` serialization
50d5724 [Security] Introduced `UsernameNotFoundException#get/setUsername`
39da27a [Security] Removed `get/setExtraInformation`, added `get/set(Token|User)`
837ae15 [Security] Add note about changed constructor to changelog
d6c57cf [FrameworkBundle] Register security exception translations
d7129b9 [Security] Fix exception constructors called in `UserChecker`
0038fbb [Security] Add initial translations for AccountStatusException childs
50e2cfc [Security] Add custom `getMessageKey` AccountStatusException childs
1147977 [Security] Fix InsufficientAuthenticationException constructor calls
79430b8 [Security] Fix AuthenticationServiceException constructor calls
42cced4 [Security] Fix AuthenticationException constructor calls
963a1d7 [Security] Add initial translations for the exceptions
ed6eed4 [Security] Add `getMessageKey` and `getMessageData` to auth exceptions
694c47c [Security] Change signature of `AuthenticationException` to match `\Exception`

Discussion
----------

[2.2][Security] AuthenticationException enhancements

Bug fix: semi
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=issue-837)](http://travis-ci.org/asm89/symfony)
Fixes the following tickets: #837
License of the code: MIT

This PR adds the functionality discussed in #837 and changes the constructor of the `AuthenticationException` to match that of `\Exception`. This PR will allow developers to show a translated (save) authentication exception message to the user. :)

*Todo:*
- Add some functional test to check that the exceptions can indeed be translated?
- Get feedback on the current English messages

---------------------------------------------------------------------------

by asm89 at 2012-07-15T14:04:11Z

ping @schmittjoh

---------------------------------------------------------------------------

by schmittjoh at 2012-07-15T14:57:32Z

Looks good to me.

While you are at the exceptions, I think we can also get rid of the "extra information" thing and replace it by explicit getters/setters. Mostly that will mean adding set/getToken, set/getUser, set/getUsername. Bundles might add custom exceptions which have other data. This will make it a bit more useful and predictable.

---------------------------------------------------------------------------

by asm89 at 2012-07-15T15:40:45Z

@schmittjoh I removed the `get/setExtraInformation` and added the more explicit getters/setters as you suggested.

---------------------------------------------------------------------------

by asm89 at 2012-07-15T19:33:15Z

@fabpot Did you reschedule this for 2.2? Why? It was originally a 2.1 ticket. I think it is an important one because at the moment there is no reliable way to show users the cause of an `AuthenticationException` without the threat of exposing sensitive information. This issue has been around for a while, see the original issue this PR refers to, or for example [this TODO comment in FOSUB](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Controller/SecurityController.php#L37).

The PR itself is ready to merge now. My only question that remains is about whether the actual translations should be functional tested?

---------------------------------------------------------------------------

by fabpot at 2012-07-15T19:43:19Z

We need to stop at some point. If not, we never release anything. beta3 was scheduled for today and I don't plan any other one before the first RC and I won't have time to review this PR next week. So, if you, @schmittjoh, @vicb, @stof, and a few other core devs "validate" this PR, I might consider merging it before 2.1.

---------------------------------------------------------------------------

by asm89 at 2012-07-15T19:46:09Z

@fabpot I totally agree with your point of view. I just have been trying to pickup some security issues that were still open. :)

---------------------------------------------------------------------------

by stof at 2012-07-15T19:50:29Z

This looks good to me

---------------------------------------------------------------------------

by asm89 at 2012-08-12T09:06:24Z

Since the beta period is over I assume the window was missed to get this security related PR in 2.1. If I have feedback from @fabpot I'll still try to make it mergeable asap though.

---------------------------------------------------------------------------

by fabpot at 2012-08-13T10:10:32Z

@asm89 This would indeed be considered for merging in 2.2.

---------------------------------------------------------------------------

by Antek88 at 2012-10-03T10:30:46Z

+1

---------------------------------------------------------------------------

by stof at 2012-10-04T21:27:15Z

@asm89 could you rebase this PR ? It conflicts with master

---------------------------------------------------------------------------

by fabpot at 2012-10-05T17:16:44Z

What's the status of this PR? @asm89 Have you taken all the feedback into account?

---------------------------------------------------------------------------

by stof at 2012-10-13T17:48:48Z

@asm89 ping

---------------------------------------------------------------------------

by fabpot at 2012-10-29T09:48:40Z

@asm89 If you don't have time, I can finish the work on this PR, but can you just tell me what's left?

---------------------------------------------------------------------------

by asm89 at 2012-10-29T10:02:22Z

I can pick this up, but I have two outstanding questions:
- One about adding `::create()`? https://github.com/symfony/symfony/pull/4935#discussion_r1358297
- And what is the final verdict on the messages? https://github.com/symfony/symfony/pull/4935#discussion_r1165701 The initial idea was that the exception itself have an exception message which is plain english and informative for the developer. If you want to display the 'safe' user messages you have the optional dependency on the translator. There is a comparison made with the Validator component, but in my opinion that's a different case because the violations always contain the message directed at the user and have no plain english message for the developer. Apart from that the Validator component contains it's own code for replacing `{{ }}` variables in messages (duplication? not as flexible as the translator). Concluding I'd opt for: optional dependency on translator component if you want to show 'safe' user messages + message keys.

@schmittjoh Any things to add?

---------------------------------------------------------------------------

by schmittjoh at 2012-10-29T10:14:09Z

Message keys sound good to me. I wouldn't add the ``create`` method for now.

On Mon, Oct 29, 2012 at 11:02 AM, Alexander <notifications@github.com>wrote:

> I can pick this up, but I have two outstanding questions:
>
>    - One about adding ::create()? symfony/symfony#4935<https://github.com/symfony/symfony/issues/4935#discussion_r1358297>
>    - And what is the final verdict on the messages? symfony/symfony#4935<https://github.com/symfony/symfony/issues/4935#discussion_r1165701>The initial idea was that the exception itself have an exception message
>    which is plain english and informative for the developer. If you want to
>    display the 'safe' user messages you have the optional dependency on the
>    translator. There is a comparison made with the Validator component, but in
>    my opinion that's a different case because the violations always contain
>    the message directed at the user and have no plain english message for the
>    developer. Apart from that the Validator component contains it's own code
>    for replacing {{ }} variables in messages (duplication? not as
>    flexible as the translator). Concluding I'd opt for: optional dependency on
>    translator component if you want to show 'safe' user messages + message
>    keys.
>
> @schmittjoh <https://github.com/schmittjoh> Any things to add?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/4935#issuecomment-9861016>.
>
>

---------------------------------------------------------------------------

by fabpot at 2012-10-29T10:27:37Z

As I said in the discussion about the translations, I'm -1 for the message keys to be consistent with how we manage translations everywhere else in the framework.

---------------------------------------------------------------------------

by stof at 2012-10-29T10:30:50Z

@fabpot When we changed the English translation for the validation errors in 2.1, we had to tag the commit as a BC rbeak as it was changing the source for all other translations. And if you look at the state of the files now, you will see that we are *not* using the English as source anymore in some places as some validation errors have a pluralized translation but the source has not been changed.
So I think using a key is more future-proof.

---------------------------------------------------------------------------

by asm89 at 2012-10-30T19:44:49Z

Any final decision on this? On one hand I have @stof and @schmittjoh +1 on message keys, on the other @fabpot -1. I guess it's your call @fabpot.

Edit: also @vicb seemed to be +1 on message keys earlier on.

---------------------------------------------------------------------------

by drak at 2012-11-01T20:19:00Z

I am also -1, I agree with @fabpot

---------------------------------------------------------------------------

by asm89 at 2012-11-12T09:38:51Z

@fabpot Can you please give a definite answer on this? I personally think @stof and @vicb have good points to do message keys, but with all these different people +1 and -1'ing the PR I'm lost on what it should actually do.

---------------------------------------------------------------------------

by asm89 at 2012-11-14T09:59:06Z

ping @fabpot

---------------------------------------------------------------------------

by asm89 at 2012-11-26T10:01:27Z

ping @fabpot We talked about this in Berlin. Any final thoughts on the PR? :) One idea was to do message keys + opt depend on the translator component if you want to use them, or use your own implementation.

---------------------------------------------------------------------------

by fabpot at 2012-11-26T14:01:37Z

The conclusion is: keep using plain English.

On Mon, Nov 26, 2012 at 11:01 AM, Alexander <notifications@github.com>wrote:

> ping @fabpot <https://github.com/fabpot> We talked about this in Berlin.
> Any final thoughts on the PR? :) One idea was to do message keys + opt
> depend on the translator component if you want to use them, or use your own
> implementation.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/4935#issuecomment-10709997>.
>
>

---------------------------------------------------------------------------

by Inori at 2012-11-26T15:00:22Z

is this final? if not, then +1 for message keys

---------------------------------------------------------------------------

by vicb at 2012-11-27T22:33:47Z

@fabpot I can't understand why we keep discussing this for months as this implementation use *both* keys and plain Englis, ie using  keys  is optional ( if it was not it would not be an issue according to #6129)

---------------------------------------------------------------------------

by asm89 at 2013-01-02T21:43:46Z

@fabpot @vicb I'll rebase this PR, fix the comments and refactor the message keys to use plain English + {{ }} syntax for the placeholders.

---------------------------------------------------------------------------

by asm89 at 2013-01-07T15:00:58Z

@fabpot If I fix this tonight, will it make the beta?

---------------------------------------------------------------------------

by fabpot at 2013-01-07T15:53:00Z

yes, definitely.

---------------------------------------------------------------------------

by asm89 at 2013-01-07T20:13:38Z

@fabpot I switched the implementation to English messages instead of message keys and fixed the final comments + rebased. Anything you want me to do after this?

Still happy with `getMessageKey()`?
2013-01-10 14:38:06 +01:00
Fabien Potencier
f9ed2bc3c7 merged branch stloyd/bugfix/process_cwd (PR #6620)
This PR was merged into the 2.0 branch.

Commits
-------

880da01 [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)

Discussion
----------

[2.0][Process] In edge cases `getcwd()` can return `false`

Bug fix: yes
Feature addition: no
BC break: no
Symfony2 tests pass: yes

In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process).

---------------------------------------------------------------------------

by stloyd at 2013-01-08T12:43:40Z

I guess that this could be related to #6496, as error code `267` at Windows means:
[`ERROR_DIRECTORY - The directory name is invalid.`](http://msdn.microsoft.com/en-us/library/ms681382%28v=vs.85%29.aspx#error_directory)

---------------------------------------------------------------------------

by Seldaek at 2013-01-08T12:57:38Z

If null already uses the current working directory, what's the point of calling getcwd() at all?

---------------------------------------------------------------------------

by stloyd at 2013-01-08T13:03:06Z

@Seldaek TBH. I don't have idea =) It seems that it's there _from the beginning_, but yeah, I was a bit confused by usage of it too...

---------------------------------------------------------------------------

by fabpot at 2013-01-09T08:13:24Z

What about removing the code altogether?

---------------------------------------------------------------------------

by stloyd at 2013-01-09T08:22:55Z

@fabpot I'm ok with that, just not sure it will not be an BC break...

---------------------------------------------------------------------------

by Seldaek at 2013-01-09T08:24:57Z

php.net says `or NULL if you want to use the default value (the working
dir of the current PHP process)` which sounds like getcwd() to me.

---------------------------------------------------------------------------

by Seldaek at 2013-01-09T08:26:32Z

For full BC though, `getWorkingDirectory` should `return $this->cwd ?:
getcwd();` Then at least if that call fails the whole process isn't
failing. I don't see why anyone would use that getter though.

---------------------------------------------------------------------------

by stloyd at 2013-01-10T12:43:59Z

@fabpot @Seldaek What do you think about this now?

---------------------------------------------------------------------------

by Seldaek at 2013-01-10T12:58:39Z

👍
2013-01-10 14:32:53 +01:00
Joseph Bielawski
880da01c49 [Process] In edge cases getcwd() can return false, then proc_open() should get null to use default value (the working dir of the current PHP process) 2013-01-10 12:59:53 +01:00
Yaroslav Kiliba
6b1652e5ee [PropertyAccess] Property path, small refactoring, read/writeProperty to read/write Property/Index. 2013-01-10 09:49:43 +01:00
Bernhard Schussek
1bae7b242c [PropertyAccess] Extracted PropertyAccess component out of Form 2013-01-10 09:49:37 +01:00
Christophe Coevoet
68257d372f Enhanced the triggering of E_USER_DEPRECATED errors
- Removed useless error handlers around FormEvent as the triggering has
  been fixed in it.
- Enhanced the triggering of deprecation errors for places where the BC
  method provide some user logic needing to be converted to a new way.
- Enhanced the deprecation messages to mention the replacement whenever
  possible.
2013-01-10 09:22:55 +01:00
Fabien Potencier
f17f5867a8 moved the container aware HTTP kernel to the HttpKernel component 2013-01-10 09:21:32 +01:00
Fabien Potencier
2eea7682e7 moved the deprecation logic calls outside the new HttpContentRenderer class 2013-01-10 09:21:32 +01:00
Fabien Potencier
bd102c5eba made the content renderer work even when ESI is disabled or when no templating engine is available (the latter being mostly useful when testing) 2013-01-10 09:21:31 +01:00
Fabien Potencier
a8ea4e4b10 [FrameworkBundle] deprecated HttpKernel::forward() (it is only used once now and not part of any interface anyway) 2013-01-10 09:21:31 +01:00