Cookie Domain Field in J! 1.6

181 views
Skip to first unread message

Imran Ali

unread,
Jun 1, 2009, 9:36:43 AM6/1/09
to Joomla! CMS Development
Currently Joomla! does not allow any way to set the cookie domain for
cookies that are generated by Joomla! Would it be possible to add a
cookie domain field in J! 1.6 where a user can enter a field of his/
her choice? This can considerably help us at JFusion where we need to
sync sessions across different CMSs and thus need to play with cookie
domains to achieve dual login from one software to another.

Sam Moffatt

unread,
Jun 1, 2009, 9:44:23 AM6/1/09
to joomla-...@googlegroups.com
Submit a patch that does what you need it to. It shouldn't be too hard
to achieve, you need to store the setting somewhere (global config
seems appropriate) and you will also need to update where the cookie
are set (I'm not quite sure where that would be off the top of my
head, been a while since I went digging). I'd extend it to also
include path as well (use a single text box though and just extract
the path from it) so you can actually go to be more specific in some
cases in addition to being less specific.

I've certainly wondered about building it for a while now but never
had the time to put it together. When you've got your patch together
drop a line in this chat so that we can get some people looking at it,
testing and then merged in,

Cheers,

Sam Moffatt
http://pasamio.id.au

Joe Palmer

unread,
Jun 1, 2009, 12:27:37 PM6/1/09
to joomla-...@googlegroups.com
This would be a great feature! We made a hack to
libraries/joomla/session/session.php for one of our project to keep
people logged in across subdomains when using domain alias's. We
didn't bring it forwards as parameter but I'm sure it wouldn't be to
difficult.

Happy to share the hacked session.php if it will help.

Joe


2009/6/1 Sam Moffatt <pas...@gmail.com>:

Imran Ali

unread,
Jun 10, 2009, 12:45:13 PM6/10/09
to Joomla! CMS Development
Hey Joe
Can you post your modifications? Would be great to start with. I think
the field to set this can be placed somewhere in the Global
Configuration Options. What say people?

Cheers
Imran

On 1 June, 21:27, Joe Palmer <plantoni...@googlemail.com> wrote:
> This would be a great feature! We made a hack to
> libraries/joomla/session/session.php for one of our project to keep
> people logged in across subdomains when using domain alias's. We
> didn't bring it forwards as parameter but I'm sure it wouldn't be to
> difficult.
>
> Happy to share the hacked session.php if it will help.
>
> Joe
>
> 2009/6/1 Sam Moffatt <pasa...@gmail.com>:
>
>
>
> > Submit a patch that does what you need it to. It shouldn't be too hard
> > to achieve, you need to store the setting somewhere (global config
> > seems appropriate) and you will also need to update where the cookie
> > are set (I'm not quite sure where that would be off the top of my
> > head, been a while since I went digging). I'd extend it to also
> > include path as well (use a single text box though and just extract
> > the path from it) so you can actually go to be more specific in some
> > cases in addition to being less specific.
>
> > I've certainly wondered about building it for a while now but never
> > had the time to put it together. When you've got your patch together
> > drop a line in this chat so that we can get some people looking at it,
> > testing and then merged in,
>
> > Cheers,
>
> > Sam Moffatt
> >http://pasamio.id.au
>

Sam

unread,
Jun 23, 2009, 11:44:07 AM6/23/09
to Joomla! CMS Development
I wasn't sure if anyone had followed through with this but since I had
just brought the issue up with the JoomFish folks and had to make
these changes for a site, I thought I would go ahead and submit a
feature patch.

The change affects about 5 core files, adds one to the com_config, and
will affect all com_config language files.

Here is the url on the feature tracker:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=16939

I hope that you find it complete.
This was run against the 1.6 trunk this morning but would be real easy
to run against the current 1.5 release.

This is my first time submitting a patch so let me know if I left
anything out.

Sam Lewis
> > >> Currently Joomla! does not allow any way to set thecookiedomain for
> > >> cookies that are generated by Joomla! Would it be possible to add a
> > >>cookiedomain field in J! 1.6 where a user can enter a field of his/
Reply all
Reply to author
Forward
0 new messages