Log message #4178872

# At Username Text
# Mar 5th 2019, 17:14 manthan.budheliya ok.. But what if I want to disable csrf also for the action?
# Mar 5th 2019, 17:14 jeremyharris and https://book.cakephp.org/3.0/en/controllers/components/csrf.html#csrf-protection-and-ajax-requests
# Mar 5th 2019, 17:13 jeremyharris for unlocking a certain action from form tampering (Security), it’s $this->Security->setConfig(‘unlockedActions’. [‘index’]), see: https://book.cakephp.org/3.0/en/controllers/components/security.html#disabling-security-component-for-specific-actions
# Mar 5th 2019, 17:13 daniel.upshaw Kind of neat I think.. for a pure PHP solution
# Mar 5th 2019, 17:12 jeremyharris CSRF and Security are two different things. If you want to use CSRF with ajax within your application, add the token to the headers (see the CSRF docs for this)
# Mar 5th 2019, 17:12 daniel.upshaw https://stackoverflow.com/a/45966
# Mar 5th 2019, 17:12 manthan.budheliya My aim is to off the both component only for the particular action
# Mar 5th 2019, 17:12 daniel.upshaw What I want to do is execute a `ps` to check the status... I feel pretty good about that idea
# Mar 5th 2019, 17:12 manthan.budheliya @jeremyharris I have off the security component and removed csrf from application.php. It works But when I add csrf in application.php and off the component in beforeFilter function of component. it is not working
# Mar 5th 2019, 17:11 jeremyharris It’s possible, but depends on your queue system. My queue system, for example, executes events within the application. However I have commands that are used by cron in the background as well, such as bin/cake backup
# Mar 5th 2019, 17:09 daniel.upshaw It's kind of a hot topic sometimes
# Mar 5th 2019, 17:09 daniel.upshaw In PHP, it's possible to run background processes using CLI syntax
# Mar 5th 2019, 17:09 birdy247 but both together and it brings back records with hello OR world in the title
# Mar 5th 2019, 17:09 manthan.budheliya ok let me check
# Mar 5th 2019, 17:09 birdy247 or "world"
# Mar 5th 2019, 17:09 jeremyharris you can unlock the action @manthan.budheliya, see the SecurityComponent docs
# Mar 5th 2019, 17:09 birdy247 it currently works with just "hello"
# Mar 5th 2019, 17:08 birdy247 This would then find any records that are not LIKE hello OR world
# Mar 5th 2019, 17:08 manthan.budheliya So what should I do?
# Mar 5th 2019, 17:08 birdy247 I am wanting to type in a search box something like: "hello world"
# Mar 5th 2019, 17:08 slackebot1 <birdy247>
# Mar 5th 2019, 17:08 jeremyharris csrf is for accepting/denying requests from outside sources
# Mar 5th 2019, 17:08 jeremyharris @manthan.budheliya token is related to the Security component, used to protect from form tampering
# Mar 5th 2019, 17:08 birdy247 I am using the FOC search plugin (aweseom!)
# Mar 5th 2019, 17:07 birdy247 Hi! :slightly_smiling_face:
# Mar 5th 2019, 17:07 daniel.upshaw Perhaps
# Mar 5th 2019, 17:07 daniel.upshaw It appears to be the CommandRunner
# Mar 5th 2019, 17:07 daniel.upshaw @jeremyharris Thank you
# Mar 5th 2019, 17:07 manthan.budheliya Buut now I am getting error '_Token' was not found in request data.'
# Mar 5th 2019, 17:07 jeremyharris for running them in the background, you will need a queue system or use cron to run the command
# Mar 5th 2019, 17:07 manthan.budheliya but havin problem with CSRF token mismatch so I removed that component from Application.php file
# Mar 5th 2019, 17:07 manthan.budheliya Hello guys I am creating an endpoint for posting data through ajax
# Mar 5th 2019, 17:07 jeremyharris check out this: https://book.cakephp.org/3.0/en/console-and-shells/commands.html
# Mar 5th 2019, 17:06 daniel.upshaw This appears mostly about creating new commands rather than running other commands: https://book.cakephp.org/3.0/en/console-and-shells.html
# Mar 5th 2019, 17:05 daniel.upshaw It is hard to determine from the docs... There may be a "Cake way" to run a background process / external command line program
# Mar 5th 2019, 15:46 neon1024 ..but the readme says it doesn’t need routes in the addPlugin
# Mar 5th 2019, 15:46 neon1024 I mean, sure my default is `DashedRoute`, perhaps it needs routing true
# Mar 5th 2019, 15:45 neon1024 Not sure how this is happening
# Mar 5th 2019, 15:45 neon1024 `Error: Your routing resulted in Debug-kit as a controller name.`
# Mar 5th 2019, 15:03 grossolive4 Yes, And I can't delete folder when deleting the entity. => deleteCallback webroot{DS}uploads{DS}{table}{DS}{field}{DS}{field-value:uuid}{DS} https://github.com/FriendsOfCake/cakephp-upload/issues/459 https://cakephp-upload.readthedocs.io/en/latest/examples.html#advanced-example Any new suggestions?
# Mar 5th 2019, 14:49 rudy1976s I need some example to how correctly write a select field using full text search with query builder