Re: Security component and session timeout

2010-01-18 Thread Stinkbug
Just checking to see if anyone has any recommendations on this before I start implementing something myself. On Dec 16 2009, 10:49 pm, Stinkbug wrote: > I've been using the security component for quite some time, but there > is one issue that I've never been able to figure out w

Security component and session timeout

2009-12-16 Thread Stinkbug
I've been using the security component for quite some time, but there is one issue that I've never been able to figure out with it. When I have a form and the user takes a while to fill it out, it will get blackholed. I'm guesing the security component is using a session some how on the form. It

Re: Trouble with installation

2009-10-10 Thread Stinkbug
You have ever figure out the problem for this. I'm having similar problems. On Sep 27, 1:20 pm, Nigel wrote: > I have tried it.  But I will try again.  Probably with a fresh install > of apache.  I'll try purging everything and reinstalling.  I'm pretty > sure its some silly mistake that I did.

Re: How use ACL in a particular situation

2009-10-02 Thread Stinkbug
Users belonging to multiple groups is a pretty common question. There are already some good discussions on how to do it. Here is one where I give my take on how we did it. http://groups.google.com/group/cake-php/browse_thread/thread/b3b646023e97c1f3/5a2d623896424a56?hl=en&lnk=st On Sep 29, 2:

Re: executing queries from a .sql file in the console

2009-09-24 Thread Stinkbug
g/view/735/Generating-and-using-Schema-files > - S > > 2009/9/23 Stinkbug > > > > > I'm trying to execute a bunch of sql from a .sql file from the > > console.  I was trying to use the query method inside the Model class, > > but I keep getting the follow

executing queries from a .sql file in the console

2009-09-23 Thread Stinkbug
I'm trying to execute a bunch of sql from a .sql file from the console. I was trying to use the query method inside the Model class, but I keep getting the following error. Error: Missing database table 'models' for model 'Model' Below is my code: query($sql); }

Re: File Uploads: What security-issues I have to take care of?

2009-08-31 Thread Stinkbug
There is one thing to keep in mind when uploading files and that's the security risks in uploading files to the webroot where people can access them directly. It's generally recommended to upload files to a directory outside of the webservers document root and give them a unique name, so that the

Re: getting a 404 with Media View

2009-08-12 Thread Stinkbug
ssion on that directory. But > start with debugging the path to be sure it what you expect. > > http://groups.google.com/group/cake-php/browse_thread/thread/0f648c14... > > On Tue, Jul 28, 2009 at 10:37 AM, Stinkbug wrote: > > > I'm assuming this is an apache config problem, but I

Re: getting a 404 with Media View

2009-07-29 Thread Stinkbug
Thanks for the tips guys. I'll have to do these tests late at night since it's on a production box. Since I'm using CakePHP I haven't messed with the .htaccess files. They are what comes with Cake. The permissions on the directory is chmod 777. the owner and groups are root.data, the same as

getting a 404 with Media View

2009-07-28 Thread Stinkbug
I'm assuming this is an apache config problem, but I'm not sure what could be causing it. Thought I'd just ask the community to see if anyone knew what the problem might be. I'm using the Media view to download files and have the files directory outside the webroot. I'm getting a 404 Page canno

Re: A Search Behavior

2009-07-13 Thread Stinkbug
gt; GravyFace wrote: > > I was looking at implementing this in CakePHP (it's a sourceforge > > award nominee): > >http://sphinxsearch.com/ > > > On Fri, Jul 10, 2009 at 5:29 PM, Stinkbug wrote: > > >> I've done a little searching around on the web for

A Search Behavior

2009-07-10 Thread Stinkbug
I've done a little searching around on the web for search features for CakePHP. I've found a couple of different Searchable Behaviors out there. However, they all seem a bit basic. I have a few ideas for a more advanced Search feature. First, I believe a Behavior would probably the way to go,

Question on containable

2009-06-05 Thread Stinkbug
I'm using the containable behavior to grab some data. I have a News Category model the hasAndBelongsToMany News. This way I can associate a news article with many different news categories. So I'm wanting to grab all of the news categories with a limited number of news articles for each. So th

Re: Please Please Help - Non conventional CakePHP ACL Setup...

2009-06-05 Thread Stinkbug
I don't know if it really matters if you change you schema to Cakes conventions. The Models are pretty configurable if you know how to do it. As far the ACL there have been many posts on how to set them up. I've explained how I set must stuff up once before. Check it out and see if helps you.

Re: Cake php connection with MS Sql Server 2000

2009-05-29 Thread Stinkbug
I haven't seen anyone ever comment that they actually figured out how to make this work. We attempted it, but there were all kinds of problems. First, trying to find a driver for linux that would allow us to make a connection through cake to SQL Server was a huge problem. We could manually make

Re: Security requireAuth on admin_add and admin_edit

2009-05-02 Thread Stinkbug
I might be mistaken, but I'm using the Security component not the Auth component. I believe it's two different things. My problem is with the Security component not blackholing the request when I try to maliciously modify the form. On May 1, 3:43 pm, "Benedikt R." wrote: > Did you try this?: >

Re: Security requireAuth on admin_add and admin_edit

2009-05-01 Thread Stinkbug
            parent::beforeFilter(); > > Best regards > > On 1 Mai, 21:02, Stinkbug wrote: > > > I usually use the security components requireAuth to make sure that > > hidden field values haven't been changed when the form is submitted > > back to the server.  This usual

Security requireAuth on admin_add and admin_edit

2009-05-01 Thread Stinkbug
I usually use the security components requireAuth to make sure that hidden field values haven't been changed when the form is submitted back to the server. This usually works fine. However, I noticed it doesn't seem to matter on my admin_add and admin_edit actions. Is there something I'm missin

Re: Using ACL in View?

2009-04-07 Thread Stinkbug
I believe the proper MVC way to do it is to do the check in your controller and set the variables for you view. So in your controller you might have something like this: if ($this->Acl->check(your acl info)) { $this->set('admin', true); } Then in your view you would simple check the $admin

Re: Save null or empty datetime fields

2009-03-31 Thread Stinkbug
I ran into the same problem. I've been told this is a PHP problem, not really a Cake problem. The way we ended up handling it is by creating a stored procedure and calling that procedure within our model. Basically, what the procedure does is take the data and makes sure that all -00-00 fie

Re: Submit several forms with a button

2009-02-27 Thread Stinkbug
So let's think about this. Is your client just worried about how the form looks (3 buttons and 1 submit all button)? Technically, if there is no reason to have 3 separate forms, don't create 3 separate forms, unless the client requirement is calling the programming shots too. It's possible you c

EasySoft MS SQL Drive with unixODBC

2009-02-12 Thread Stinkbug
We're trying to connect to sql server and we've installed the EasySoft MS SQL Driver and I'm told that the connection is working (I'm not the one that installed it and test it), but we can't get it to work in Cake. Has anyone tried using this driver and if so, what did you have to do to get it to

Re: Mod_rewrite and Mac OSX

2008-12-17 Thread Stinkbug
I had the same problem. Took me forever to figure it out. You can also turn on hidden files in your finder. http://www.macworld.com/article/51830/2006/07/showallfinder.html What I ended up doing is creating these commands in automator as a plugin. Now I can just pull up my right click menu an

Re: Is CakePHP 1.2 fully backwards compatible with 1.1.16?

2008-12-13 Thread Stinkbug
I've published a little information on the migration process. Maybe that will help you out. One of the biggest hurdles for me was the ACL changes. At the time there wasn't much information about the changes, but I think most of that information has been updated in the Cook book now. My article

Re: Getting all the acos a aro can access?

2008-12-03 Thread Stinkbug
I asked the same question somewhere once. I was pretty much told since the ACL is mptt, that I would have to loop through each object and check it that way. That's what I'm doing. The performance isn't the best especially in our local development environments, but our production server is prett

Re: Proper set up for cache directory

2008-12-01 Thread Stinkbug
Figured I'd post this here in case someone else is wondering too. It appears that is the recommended solution. chown -R wwwrun.www app/tmp This is better than leaving permissions wide open. On Dec 1, 10:50 am, Stinkbug <[EMAIL PROTECTED]> wrote: > The Docs says: > > &qu

Proper set up for cache directory

2008-12-01 Thread Stinkbug
The Docs says: "make sure the /app/tmp directory in your cake installation is writable by the web server user." On my server images and files have a user and group of wwwrun.www. I tried changing the cache directory to that user and group and it works. All of my other files are set up as root.

Re: Security handling details - customers keep asking!!!

2008-11-27 Thread Stinkbug
You should be fine from SQL injection if you cakes conventions. That part is built in. But you need to implement the security component and the sanitize class. You can find information on implementing those in the docs. I font think there are any security issues with the acl. Not sure on the autho

Re: Migration to Cake 1.2

2008-11-23 Thread Stinkbug
If it's helpful, I've published my migration process. http://blog.stinkbug.net/?p=1204 It includes links to other articles that show deprecated stuff in 1.2, how I handled the ACL changes, and a couple of other issues that were giving problems. On Nov 22, 10:03 am, Lakshmi <[EMAIL PROTECTED]>

A couple of things with Security Component

2008-10-31 Thread Stinkbug
I'm having a bit of a problem with the Security Component on one of my actions. It works on most, but this one action is quiet complex. I'm not even sure what the problem could possible be. So rather than asking what the problem is with my action, I would rather ask if there is any information

Re: Help with ACL

2008-10-31 Thread Stinkbug
Well, so much for an answer soon. Sorry about that. Not sure if you still need help with this, but could you show us your aro and aco structures so I get get a better idea as to what you're trying to do. I think I see what you're trying to do, but let's see if you have a proper ACl setup first.

Re: Help with ACL

2008-10-23 Thread Stinkbug
There is already a good discussion about users in multiple groups. Check it out and see if it helps you out. http://groups.google.com/group/cake-php/browse_thread/thread/b3b646023e97c1f3/5a2d623896424a56?hl=en&lnk=st&q=#5a2d623896424a56 I don't think Cake really supports it. However, in my opin

Re: I'm having a problem with containable

2008-10-22 Thread Stinkbug
y('ListLink', array( > > Try: > 'contain' => array('ListLink' => array(... > > Make a connection between 'LinkList' => and => it's => array(). > The way you wrote it it's two separate parameters... > > On 22 Oct 200

I'm having a problem with containable

2008-10-21 Thread Stinkbug
ay ( [id] => 3 [title] => Featured Story ) [ListLink] => Array ( [0] => Array ( [id] => 1 [title] => It's the great and mighty Stinkbug!

Re: cookie tutorial

2008-10-21 Thread Stinkbug
I had a problem with cookies a while back. Couldn't seem to reference them after I saved them. I know the docs say the domain variable is required, but as soon as removed it, everything started working as expected. On Oct 20, 1:27 am, . <[EMAIL PROTECTED]> wrote: > I don't think it is saving the

Re: Sanitize problem with writing negative numbers into db

2008-10-12 Thread Stinkbug
The best part of sanitize that I found was the stripAll/stripScripts, if you want prevent things like XSS attacks. However, I'm a big fan of the HTMLPurifier that I'm already using in my app. I think for my app, I'm going to use the HTMLPurifier and create a function to loop through arrays of da

Re: retrieving an ARO list that have access to an ACO

2008-09-05 Thread Stinkbug
ACO. > > Probably, if what you need it's the list of ACOS an user can do, > you should iterate over leaf nodes of ACO and check them one by one, > (or viceversa if you need the ooposite thing). > > On Sep 5, 5:42 pm, Stinkbug <[EMAIL PROTECTED]> wrote: > > > I&

retrieving an ARO list that have access to an ACO

2008-09-05 Thread Stinkbug
I'm having a some trouble finding practical examples on how to do this. I would like to take an ACO and find a list of ARO's that have access to it. And visversa, an ARO and find what ACO's that Aro has access to. Is there something built into cake that will do that. I've looked at the AclNode

Re: Migrate Cake Php 1.1 to 1.2

2008-07-21 Thread Stinkbug
I'm migrating my application right now too. I'm currently in the process of writing up an article on my experience. There are several articles out there. My experience has been anything but easy though, however my application is complex. Maybe I'll have it posted in a about a week and I'll pos

Re: redirect and header error but no white space

2008-07-18 Thread Stinkbug
The problem appears to be with an LDAP integration that I have in my User Model. A Temporary solution... Disable it. Once I figure out what the problem is, I'll try and remember to post that information here. On Jul 18, 9:04 am, Stinkbug <[EMAIL PROTECTED]> wrote: >

Re: redirect and header error but no white space

2008-07-18 Thread Stinkbug
.php, line 256 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 230 [main] - APP\webroot\index.php, line 90 The location is the page I'm trying to redirect to. I'm still looking into the issue. Surely something has to be causing it. On Jul 18, 2:11 am, AD7six <[EMAIL PROTECTED]&

Re: redirect and header error but no white space

2008-07-17 Thread Stinkbug
osing ?> is optional > > On Jul 17, 2:20 pm, haj <[EMAIL PROTECTED]> wrote: > > > I'm using this editor on windows: > > >http://www.emeditor.com/ > > > There is a checkbox in config menu if to add BOM or not for UTF-8. > > Some editor may not have this feat

Re: redirect and header error but no white space

2008-07-16 Thread Stinkbug
Excuse my stupidity on this topic, but I don't really understand encoding at all. So how exactly do I save a a file without the BOM? Does it require special software, or what? I'm on windows. On Jul 14, 11:39 pm, haj <[EMAIL PROTECTED]> wrote: > So, I basically saved all UTF-8 files without BO

Re: ACL with multi-group membership?

2008-07-15 Thread Stinkbug
Not sure if this will help you out or not, but I can explain what I've done in our application. I thought about a way to have the same user under two different departments. What I really starting thinking about it though, I found it wasn't necessary (at least in my case). I have something like

Re: ACL

2008-07-15 Thread Stinkbug
> Can anyone let me know, the use of ACL in cakephp, and howz we can > implement that ? It's not an easy thing to wrap your head around. However, it's really powerful. If you read the "Understanding How ACL Works" you should get a pretty good idea how powerful, flexible, and maintainable it is.

Re: Documentation

2008-07-09 Thread Stinkbug
I made this comment elsewhere in a forum where I was getting some help, but since this is specifically about the documentation I thought I'd post it here too. This page: http://book.cakephp.org/view/411/migrating-from-cakephp-1-1-to- It might be helpful to mention the ACL changes. The way you

Re: ACL in Cake 1.2

2008-07-07 Thread Stinkbug
be found? If you have to use an integer id, surely there has to be an easy way to retrieve it. I guess it's all fine if you're doing everything manually, but I want it automated. On Jul 3, 5:05 pm, francky06l <[EMAIL PROTECTED]> wrote: > @Stinkbug > parent, as far as I know should

Re: ACL in Cake 1.2

2008-07-03 Thread Stinkbug
To expand on this... I almost figured out everything that I need to do to get my stuff working. The major problem I'm having now is with the parent_id. Is there anyway to retrieve the id by passing something like Department.1 (this would be the model and foreign_key, or alias)? In the 1.1 vers

Re: ACL in Cake 1.2

2008-07-02 Thread Stinkbug
Thanks for the help! I checked the manual again and it appears it has been updated. Unless I was viewing the the 1.1 stuff unintentionally, it must have been updated yesterday. When I was viewing the ACL manual stuff yesterday it was showing the old way of doing things. Anyway, I'm sure I can

ACL in Cake 1.2

2008-07-01 Thread Stinkbug
I have a brand new install of Cake 1.2. I only have one controller and I've installed my ACL tables. Here is the code in my controller. create(0, null, 'Employees'); $aro->create(0, null, 'Admin'); $aro->create(0, null, 'ManagerButtons'); } } ?> I'm jus

Re: Cookies in CakePHP

2008-06-10 Thread Stinkbug
I'm still looking for an answer on this if anyone knows what the problem is. On Jun 8, 4:59 pm, Stinkbug <[EMAIL PROTECTED]> wrote: > Here is some test code that I used to test cookies with. > > class StudiesController extends AppController { >

Cookies in CakePHP

2008-06-08 Thread Stinkbug
Here is some test code that I used to test cookies with. Session->check('user_id')) { echo $this->Cookie->read('password'); $this->Session->setFlash('You are logged in!'); } } function getstarted() {

Re: Component and models

2008-05-23 Thread Stinkbug
I've wanted to do the same thing several times, but they keep telling me it's best of you don't access models from components (don't ask me why). One thing they told me in the IRC chat is that most of the time it's best to pass data as a parameter to the component. Any reusable code that needs to

ACL Problems

2008-05-16 Thread Stinkbug
I'm having a ACL problem in cakephp. When I try to grant permissions, I just get a "permission could not be granted". I'm on a Windows box, but I'm having the same problem on our test server, which is a linux box. Anyone have any idea why that might be? My command look like this: php acl.php

using files outside of app direcotry

2007-12-05 Thread Stinkbug
Our app will allow people to upload files. What I would like is to store these files outside of the app directory, so that when we do new deployments we don't have to be careful to overide files in the webroot directory. Is there a recommended way to do this? --~--~-~--~~---