# |
Mar 16th 2018, 14:53 |
dereuromark |
or provide a way to cross-login etc |
# |
Mar 16th 2018, 14:53 |
dereuromark |
but in that case wouldnt it be better to share the same? |
# |
Mar 16th 2018, 14:52 |
dereuromark |
that should work |
# |
Mar 16th 2018, 14:51 |
bez |
also could I from the model temporarily change the salt with configure::write, so that when saving this password it uses the salt of the other application? |
# |
Mar 16th 2018, 14:50 |
bez |
i looked into to it and could not be sure, i also found some posts online on people discussing and none were sure. apparently most of them seem to believe it does not use the salt (but I agree with you that it does not make sense) |
# |
Mar 16th 2018, 14:49 |
dereuromark |
but it seems likely, for obvious security reasons |
# |
Mar 16th 2018, 14:49 |
dereuromark |
look into the code, if it uses the salt |
# |
Mar 16th 2018, 14:49 |
bez |
even when using the DefaultPasswordHasher? because I tried to temporarily change the salt and yet it does not sign in.. |
# |
Mar 16th 2018, 14:48 |
dereuromark |
yes, if they dont share the same salt. |
# |
Mar 16th 2018, 14:48 |
bez |
i am creating an account in one cakephp application for 'managers', so that they could login in another cakephp app made just from them, however it appears that after saving the (hashed) password, they are not able to login due to incorrect password (and i am sure the password is correctly inputed). any clues? does this have do to with Security.salt? |
# |
Mar 16th 2018, 14:46 |
dereuromark |
unless it is a real post with payload. you need to be a bit more verbose here |
# |
Mar 16th 2018, 14:45 |
dereuromark |
prg pattern via query strings for example |
# |
Mar 16th 2018, 14:42 |
patsuckow |
Hello everybody! Tell me where to read how to read how to transfer post data from one action to another? |
# |
Mar 16th 2018, 14:25 |
damian |
Thanks. I'll look into that! |
# |
Mar 16th 2018, 14:17 |
dereuromark |
the method you want to use is being invoked from the shell when it fails, you cannot "pull" with this method. So I would recommend the listener approach instead. |
# |
Mar 16th 2018, 14:16 |
dereuromark |
wouldnt that be just a logger you can hook in? Since it is scoped to queue: Log::write('info', $message, ['scope' => 'queue']); => custom listener => send |
# |
Mar 16th 2018, 14:14 |
damian |
I'm using this manually, yes...my aim is to send an email to a designated address should the max retries be met. |
# |
Mar 16th 2018, 14:11 |
dereuromark |
are you manually using this? This is meant to be used inside the shell (and the data comes from $this->_getTaskConf() method). |
# |
Mar 16th 2018, 14:04 |
damian |
I'm currently trying to use the cakephp-queue plugin, specifically the QueuedJobTable getFailedStatus function. However, I'm not sure where to get the $taskConfiguration argument from. Can someone please assist? |
# |
Mar 16th 2018, 13:15 |
brettl |
thanks man |
# |
Mar 16th 2018, 13:09 |
dereuromark |
sure, `bin/cake clear cache` etc just as normal persistent cache |
# |
Mar 16th 2018, 13:08 |
brettl |
@dereuromark the tinyauth plugin is there a command line to clear out the existing cached files and start over? |
# |
Mar 16th 2018, 12:53 |
neothermic |
Cats. So many cats to skin ;) |
# |
Mar 16th 2018, 12:53 |
dereuromark |
but sure, your call lists only the wired ones. either way works I guess. |
# |
Mar 16th 2018, 12:53 |
dereuromark |
which is the normal way to list em, yeah |
# |
Mar 16th 2018, 12:52 |
neothermic |
(and I'd have to iterate through CakePlugin::loaded and call App::objects on each to get their list too) |
# |
Mar 16th 2018, 12:52 |
neothermic |
`$appShells = App::objects('Console/Command', null, false);` gives me a list of shell filenames |
# |
Mar 16th 2018, 12:48 |
dereuromark |
haha, ok. Usually App::objects() or sth in 2.x used to work to list all of one type |
# |
Mar 16th 2018, 12:46 |
neothermic |
``` $result = shell_exec(APP_CURRENT . 'Console/cake --help --xml'); $xml = new SimpleXMLElement($result); $shells = []; foreach($xml->shell as $shell) { if ((string)$shell['provider'] !== 'CORE') { $shells[] = (string)$shell['call_as']; } }``` Ugly, but works. :P |
# |
Mar 16th 2018, 12:32 |
neothermic |
Hmm, I suppose I could get dirty and call `Console/cake --help --xml` and parse the XML result, but ugh. XML :P |
# |
Mar 16th 2018, 12:30 |
neothermic |
running them is no issue, what I'd really like is just a nice list of shells in an array via an easy-to-invoke function, but it seems it's tied into a Task, so not something straight forward. |
# |
Mar 16th 2018, 12:30 |
daniel____ |
@neothermic take a look to shell_exec function |
# |
Mar 16th 2018, 12:24 |
neothermic |
(without giving them any form of command-line access or anything) |
# |
Mar 16th 2018, 12:23 |
neothermic |
So we have test platforms, and all the crons are disabled. I want the ability to let testers run the shells manually for testing. |
# |
Mar 16th 2018, 12:06 |
slackebot |
could save it in a col called job_data and just use json to turn it into a string. |
# |
Mar 16th 2018, 12:06 |
spencdev |
Then have a cron job or if you use a scheduler, to run those jobs. If you use something like exec and it’s a long running shell, it’s going to create a world of problems. If you don’t want to write it yourself I believe there are plugins for it but it’s not that complicated. It basically running a shell to get the job from the database, then processing the job based off of what type of job it is. If you needed specific data for that |
# |
Mar 16th 2018, 12:00 |
spencdev |
Create a job queue from the DB |
# |
Mar 16th 2018, 11:44 |
neothermic |
They are, I want to give some people the ability to invoke shells from a web UI |
# |
Mar 16th 2018, 11:44 |
oldskool |
@neothermic The question would be why you want to do shell stuff from your controller. The two should be separated. |
# |
Mar 16th 2018, 11:26 |
neothermic |
I don't suppose in cake2 you can get a list of shells programatically? I've spotted CommandTask::getShellList, but I don't know if there's a good way to execute that from a controller |
# |
Mar 16th 2018, 10:38 |
dereuromark |
I just released a new https://github.com/dereuromark/cakephp-ide-helper/releases/tag/0.11.0 version - with full auto-complete for element() calls. Saves me a lot of typing and typos now :slightly_smiling_face: |