# |
May 6th 2021, 15:50 |
neon1024 |
Seems it’s a session issue :) |
# |
May 6th 2021, 15:49 |
neon1024 |
// Fixate sessionid early on, as php7.2+ // does not allow the sessionid to be set after stdout // has been written to. session_id(‘cli’); |
# |
May 6th 2021, 15:46 |
neon1024 |
I see it here also https://book.cakephp.org/4/en/development/testing.html#testing-actions-protected-by-csrfcomponent-or-securitycomponent |
# |
May 6th 2021, 15:45 |
erwane |
opened an issue : https://github.com/composer/installers/issues/488 I don't found any solution for composer 2 parallel install and version check. |
# |
May 6th 2021, 15:40 |
neon1024 |
Anyone know why I see `Invalid security debug token` in my unit test when I am calling `$this->enableSecurityToken();` specifically for this? |
# |
May 6th 2021, 14:48 |
neon1024 |
THen if it’s null, it says it needs to be called, rather than telling you to load it |
# |
May 6th 2021, 14:48 |
neon1024 |
Good shout. Form->unlockField leads to trying to use the FormProtector |
# |
May 6th 2021, 14:46 |
neon1024 |
Cool, thanks @ndm I need to head into a meeting now, but that’s a great thread for me to investigate! |
# |
May 6th 2021, 14:46 |
ndm |
I'd say the error message is a bit misleading, as just calling `create()` will not create a form protector instance, it must be a `POST` form, and the request must contain the form token created by the form protection component. |
# |
May 6th 2021, 14:44 |
neon1024 |
Ah, sorry. My mistake, this method is not Crud |
# |
May 6th 2021, 14:44 |
ndm |
I think it's required to be able to unlock anything |
# |
May 6th 2021, 14:43 |
neon1024 |
I am using Crud though, so _it_ may have loaded it |
# |
May 6th 2021, 14:43 |
neon1024 |
I don’t believe so |
# |
May 6th 2021, 14:43 |
ndm |
*the form protection component |
# |
May 6th 2021, 14:43 |
ndm |
Do you actually have the form protector loaded? |
# |
May 6th 2021, 14:42 |
ndm |
I don't think so. |
# |
May 6th 2021, 14:41 |
neon1024 |
Does the new Csrf MIddleware need a token even for get rquest? |
# |
May 6th 2021, 14:37 |
neon1024 |
It’s a modelless form I wonder if that has upset it |
# |
May 6th 2021, 14:36 |
neon1024 |
I do call unlockField, but it’s between create() and end() |
# |
May 6th 2021, 14:33 |
ndm |
Check the stacktrace, it means `FormHelper::getFormProtector()` was invoked before `FormHelper::create()`. You possibly forgot to invoke `create()`, or accidentally invoked `unlockField()` or `submit()` before `create()`. |
# |
May 6th 2021, 14:23 |
neon1024 |
As I don’t see it here https://book.cakephp.org/4/en/controllers/components/form-protection.html |
# |
May 6th 2021, 14:23 |
neon1024 |
Or is there a docs page which explains what this is? |
# |
May 6th 2021, 14:19 |
neon1024 |
First? First what? First line? |
# |
May 6th 2021, 14:18 |
neon1024 |
`FormHelper::create() must be called first for FormProtector instance to be created` |
# |
May 6th 2021, 14:18 |
neon1024 |
Anyone know what this means? |
# |
May 6th 2021, 13:29 |
admad |
I am glad we ditched composer/installers :) |
# |
May 6th 2021, 13:22 |
erwane |
The problem come from "async" install. composer prepare package list and download/install all at same time. I can't retrive real "installed package" when composer/installers return the path. |
# |
May 6th 2021, 11:59 |
erwane |
That's it, the composer Local repository don't return "tmp packages" during installation process. I'm looking another way to bypass this |
# |
May 6th 2021, 10:10 |
neon1024 |
Odd there is only a beta muffin/trash release for Cake 4.0 |
# |
May 6th 2021, 10:10 |
neon1024 |
I’ll target 4.0.10 for now :) |
# |
May 6th 2021, 10:02 |
neon1024 |
Hey all, when upgrading from 3.9 to 4.x, what is the best 4.x release to target to get started? Start with 4.0.0? Or can I jump up a few? |
# |
May 6th 2021, 10:02 |
paolo.bragagni |
and muffin/oauth2 is for cake3 |
# |
May 6th 2021, 10:01 |
paolo.bragagni |
CakeDC/users seems too much for me |
# |
May 6th 2021, 10:00 |
paolo.bragagni |
I have wrote the script in 'simple' php that can use that IP, but I dont know to port it in 'cake' Authenticator |
# |
May 6th 2021, 09:59 |
paolo.bragagni |
trying to build an Oauth2 authenticator for my IdentityProvider but I dont know how to start .. :S |
# |
May 6th 2021, 09:08 |
admad |
https://github.com/composer/installers/commit/c839b378a7fe2ad408650841d2f5ec5b83adcf66#diff-18f4ad849c57619af66bd1ab9c0d483666d23368e9d35e6504796647adc4369b Changes like these make my theory more plausible :) |
# |
May 6th 2021, 09:03 |
erwane |
that's the better explanation. I will check that this week. |
# |
May 6th 2021, 08:56 |
admad |
Maybe the cakephp version check doesn't work as expected initially when `composer.lock` doesn't exist. |
# |
May 6th 2021, 08:55 |
admad |
@erwane |
# |
May 6th 2021, 06:35 |
kevin.pfeifer |
but sure, why the double install is needed I can’t tell you |
# |
May 6th 2021, 06:34 |
kevin.pfeifer |
and you answerd with `moment/moment` |