Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4 5   Go Down

Author Topic: Joomla 2x-3x to CPG Tunnel  (Read 85804 times)

0 Members and 2 Guests are viewing this topic.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Joomla 2x-3x to CPG Tunnel
« on: June 01, 2013, 02:01:29 pm »

This package contains a plugin for CPG and one for Joomla.  Installing and configuring the plugins will create a "tunnel" whereby registered Joomla! users can link to CPG and automatically be logged in to CPG (with automatic account creation).  Joomla! and CPG must be in the same domain.

Note: This method DOES NOT provide visual integration.

Comments, suggestions, requests, complaints ... all welcome.

README.txt
Code: [Select]
Joomla! to Coppermine Photo Gallery Tunnel
version: 1.2

The two zipped files in this package are plugins for Joomla! and CPG.
The CPG plugin is named generically because it may be used to tunnel additional web apps in the future.

For CPG:
--------
Install the plugin, cpg1.5.x_plugin_tunnel2cpg_v1.2.zip
Configure its 'secret phrase', usergroup settings and optional theme name.

For Joomla!:
------------
Install the plugin, plg_system_cpgtunnel_v1.2.zip
Enable the plugin and configure its 'secret phrase' (phrase same as CPG) and usergroup settings

Establish any links in Joomla! that will point to CPG as:  <CPG URL>/index.php?file=tunnel2cpg/joomla
Use the same link when setting up access to CPG using a Joomla! menu item 'wrapper'.


NOTES:
------
Joomla! users will have to logout and back in before a tunnel will be established.
Subsequently, when users logout from Joomla!, they will also be logged out of CPG.

Once users have accessed the CPG instance via Joomla!, they will also be able to go directly to the
CPG instance (<CPG URL>) and login with their same Joomla! username and password.

A sample CPG theme is provided that is designed for use when accessing CPG via a Joomla! menu item wrapper.

v1.1.1 Bug fix (!important!)
   Changed encoding method to correct rare issue with cookie data pattern causing site access problems
   (bad upload corrected)
   
v1.2 Maintenance/Update
   Added code to logout user from CPG when they have logged out from Joomla!.
   
« Last Edit: October 16, 2015, 07:04:11 pm by ron4mac »
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #1 on: June 01, 2013, 09:50:29 pm »

Excellent work as usual.

I assume you have seen the mehdi bridge that does similar? With a few hacks it works with Joomla 2.5 but I have not tested it with J3.x yet.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Re: Joomla! 2x-3x to CPG Tunnel
« Reply #2 on: June 01, 2013, 10:27:29 pm »

I assume you have seen the mehdi bridge that does similar?

Have not seen the mehdi bridge.  The whole bridge thing seemed a little cumbersome, so I thought I'd try a tunnel. :D
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #3 on: June 03, 2013, 01:33:31 pm »

Can you please explain what exactly your tunnel does? If you bridge Coppermine to another application, the user management and authentication is completely dropped by Coppermine. How exactly works your tunnel? Does one application use the other's user database and authentication cookies or will it be cloned in some way?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Re: Joomla! 2x-3x to CPG Tunnel
« Reply #4 on: June 03, 2013, 02:19:36 pm »

Can you please explain what exactly your tunnel does? If you bridge Coppermine to another application, the user management and authentication is completely dropped by Coppermine. How exactly works your tunnel? Does one application use the other's user database and authentication cookies or will it be cloned in some way?

When a Joomla! user logs in and is in the allowed group(s), the Joomla! system plugin grabs the the user's info, including actual password, and creates an encrypted cookie with these data that has a persistence to match how they logged in.  Then, when linking to CPG using the tunnel URL, the tunnel plugin sees the tunnel cookie and decrypts it.  If the user does not exist in CPG, the plugin creates the user in the CPG specified group, otherwise it simply logs-in the user.  In either case, the plugin then redirects to the main CPG entry point. When the Joomla! user logs out, the tunnel cookie is deleted.

I have done the same thing with myBB for a family site of mine.  In the case of myBB (and many other apps, I would presume), without hacking the app, the actual password is not available.  In that case, I take the first 10 characters of their password hash to use as a password at CPG.  This, of course, means that the user cannot login directly at CPG, but I have yet to see that as a problem.

Thanks for your interest.  Have I been clear enough?
« Last Edit: June 03, 2013, 05:01:50 pm by ron4mac »
Logged

trehahn

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #5 on: June 22, 2013, 01:24:29 am »

Hello, I have been searching for a way to link Joomla 2.5 to Coppermine for awhile, and came across this.  I installed the plugin on both sites, entered the secret phrase but it isn't working.  I get the following error:

Failed to authenticate via tunnel (sentinal not detected)

I have tried changing settings and nothing.  I also did a search for that error, and found nothing that would help me.  Any idea why it's not working?  Thank you for your time, I look forward to your reply.

Tim
Logged

trehahn

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #6 on: June 22, 2013, 01:38:59 am »

I continued to mess with settings on both sides, and was able to get it to work only if you're logged in.  I can now access it from my admin account on Joomla, and my registered account, however when I use the Public link I still get the error.  Is this normal?  Is there a way for the public to view the files?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #7 on: June 22, 2013, 01:40:12 am »

I installed the plugin on both sites, entered the secret phrase but it isn't working.  I get the following error:

Failed to authenticate via tunnel (sentinal not detected)

Hi Tim.

Two things to make sure of:  1) make sure the Joomla plugin is enabled, and 2) that you logout of Joomla and then log back in.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #8 on: June 22, 2013, 01:45:50 am »

I continued to mess with settings on both sides, and was able to get it to work only if you're logged in.  I can now access it from my admin account on Joomla, and my registered account, however when I use the Public link I still get the error.  Is this normal?  Is there a way for the public to view the files?

The tunnel is designed for registered users on Joomla to enter CPG (as CPG registered users) without having to log in.  For public users, you need to just have a normal link to your CPG instance from Joomla (and have files there viewable by the public).
« Last Edit: June 22, 2013, 01:56:19 am by ron4mac »
Logged

trehahn

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #9 on: June 22, 2013, 03:04:26 am »

I thought about the extra link for Joomla, but the problem with that is the registered users will then see 2 links, one that'll use the tunnel one that will not.    I thought of that already, but having the 2 links will be confusing for registered users.  I was hoping there was something I missed.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #10 on: June 22, 2013, 03:41:48 am »

I thought about the extra link for Joomla, but the problem with that is the registered users will then see 2 links, one that'll use the tunnel one that will not.    I thought of that already, but having the 2 links will be confusing for registered users.  I was hoping there was something I missed.
When public users link to CPG via the tunnel, they have exactly the same capabilities they would have had they linked from a normal link.  The only difference is that authentication message.  If you want to soften that message you could make changes to two files:

./plugins/tunnel2cpg/joomla.php
Code: [Select]
change 8th line:
cpgRedirectPage . . . . . [$joomlaTunnel_result], 0, 'warning');
to:
cpgRedirectPage . . . . . [$joomlaTunnel_result], 0, 'info');

./plugins/tunnel2cpg/lang/english.php
Code: [Select]
near the bottom of the file:
$lang_plugin_tunnel2cpg['nosentinal'] = ' (sentinal not detected)';
to:
$lang_plugin_tunnel2cpg['nosentinal'] = ' <whatever you would like it to say>';

I'm not sure how you're providing the link in Joomla, but there are ways to present things that will be one way for registered users and another way for public users ... but that's a thread for a Joomla! forum  :-X
Logged

trehahn

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #11 on: June 22, 2013, 08:12:27 am »

Thank you again!  Coppermine is such a great program, with the ability to do all files I haven't found any other that will do sound, video, pictures etc and is compatible with Joomla yet.  This is the only work around I've found! I may look into other Joomla options for the public/registered menu as well.  Thanks again.
Logged

ildaniel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #12 on: October 03, 2013, 11:20:57 pm »

Hi,
i have the smae problem : Failed to authenticate via tunnel (sentinal not detected)
to terhahn : your tunnel work? what are your settings in joomla and coppermine?
in addition to the secret phrase about what you have done?
thanks


Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #13 on: October 04, 2013, 01:39:27 am »

Hi,
i have the smae problem : Failed to authenticate via tunnel (sentinal not detected)
to terhahn : your tunnel work? what are your settings in joomla and coppermine?
in addition to the secret phrase about what you have done?
thanks

These requirements must be met:  The Joomla! and CPG locations must be in the same domain, both plugins must be enabled, you must be using the same web browser for access to both and you must have just logged in to Joomla! (logging out first if necessary).  And, of course, you must be linking to CPG as described in the original post above.
Logged

ildaniel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #14 on: October 26, 2013, 04:19:55 pm »

nothing. joomla and cpg in the same domain, but in different directories and in different databse. both plugins activated, the same passphrase, log out and log in, but the tunnel does not work.
I do not understand why .... I have very few options, where can I go wrong?
cookies? the user must first be registered individually in cpg for later access through the tunnel? the user must register after the installation of the tunnel?
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #15 on: October 26, 2013, 06:34:29 pm »

@ildaniel
Can you PM me with your Joomla! site url?  And will I be able to register? (or can you create an account for me)
I'll see what I might be able to discover without having to go behind the scenes.
Logged

ildaniel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #16 on: October 27, 2013, 01:57:27 am »


I can not send personal messages
the address is www.ilcubo.net
registration is permitted
thanks for asking
Logged

ildaniel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #17 on: October 27, 2013, 10:04:14 am »

activated
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #18 on: October 29, 2013, 06:07:28 pm »

activated
When logging in to your site, the tunnel plugin should be creating a cookie ("joomla_2_cpg").  That is not happening.  The only reasons that I can think of for why that is not happening is:  1) the plugin is not enabled,  2) the registered user group is not one of the groups configured in the tunnel plugin or 3) some sort of error is occurring.

Pease check your error logs for any associated error, insure that the Joomla plugin is enabled and your registered user group is configured in the plugin as an allowed group.
Logged

ildaniel

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Joomla! 2x-3x to CPG Tunnel
« Reply #19 on: October 29, 2013, 10:07:06 pm »

ok, thanks for your time
the plugin is activated, the selected group ok (I also tried to create another group for it)
from the error log I see this:

PHP Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /web/htdocs/www.ilcubo.net/home/gallerie/include/inspekt.php on line 124, referer: http://www.ilcubo.net/J3/
PHP Strict Standards: Non-static method Inspekt::makeServerCage() should not be called statically, assuming $this from incompatible context in /web/htdocs/www.ilcubo.net/home/gallerie/include/inspekt/supercage.php on line 134, referer: http://www.ilcubo.net/J3/

coppermine path should be "www.ilcubo.net/gallerie" but I see the string "ilcubo.net/home/gallerie..." maybe it's the problem here?

on the coppermine forum I read something like that in other cases, perhaps this can be the problem?
you think that I can also post on the forum Italian Joomla to verify the problem, with a link to this topic?

Logged
Pages: [1] 2 3 4 5   Go Up
 

Page created in 0.025 seconds with 20 queries.