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]   Go Down

Author Topic: CPG 1.4. bridge Bug? [eblah]  (Read 11899 times)

0 Members and 1 Guest are viewing this topic.

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
CPG 1.4. bridge Bug? [eblah]
« on: June 24, 2005, 07:23:14 pm »

the vars that are used when bridgemgr is enabled
CPG 1.4.1 will take you to the forum boards, but CPG Board will not remember it in the cookies. I have reinstalled both CPG 1.4.1 and E-Blah Forums P9 today. After the bridgemgr is enabled you get kicked off is admin of the board and you can not sign in. When I log out of the admin in CPG I get an *ERROR* when I am in the enable mode. No *ERROR* in the disable mode. is this a setting prob. or a bug?
E-Blah cookies are set up as eblah not as blah   

Here Is the new E-Blah.inc.php for E-blah P9 the code that you have is for P8 
Thank you for all of your help on the Bug.  CPG board still will not redirect back after login
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.1
  $Source: /cvsroot/coppermine/devel/bridge/eblah.inc.php,v $
  $Revision: 1.2 $
  $Author: donnoman $
  $Date: 2005/04/10 17:01:36 $
**********************************************/


if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

// Switch that allows overriding the bridge manager with hard-coded values
define('USE_BRIDGEMGR'0);

require 
'bridge/udb_base.inc.php';

class 
cpg_udb extends core_udb {

function cpg_udb()
{
global $BRIDGE$CONFIG;

if (!USE_BRIDGEMGR) { // the vars that are used when bridgemgr is disabled

// URL of your punbb
$this->cookie_name 'eblah';
$this->datapath 'var/www/cgi-bin/blah/Members/';
$this->boardurl 'http://homepage/cgi-bin/blah';
}

$this->multigroups 0;
$this->group_overrride 0;

// Database connection settings
$this->db = array(
'name' => $CONFIG['dbname'],
'host' => $CONFIG['dbserver'],
'user' => $CONFIG['dbuser'],
'password' => $CONFIG['dbpass'],
'prefix' =>$CONFIG['TABLE_PREFIX']
);

// Board table names
$this->table = array(
'users' => 'users',
'groups' => 'usergroups'
);

// Derived full table names
$this->usertable '`' $this->db['name'] . '`.' $this->db['prefix'] . $this->table['users'];
$this->groupstable =  '`' $this->db['name'] . '`.' $this->db['prefix'] . $this->table['groups'];

// Table field names
$this->field = array(
'username' => 'user_name'// name of 'username' field in users table
'user_id' => 'user_id'// name of 'id' field in users table
'password' => 'user_password'// name of 'password' field in users table
'email' => 'user_email'// name of 'email' field in users table
'regdate' => 'user_regdate'// name of 'registered' field in users table
'location' => 'user_location'// name of 'location' field in users table
'website' => 'user_website'// name of 'website' field in users table
'usertbl_group_id' => 'user_group'// name of 'group id' field in users table
'grouptbl_group_id' => 'group_id'
);

// Pages to redirect to
$this->page = array(
'register' => '/Blah.pl?,v=register',
'editusers' => '/userlist.php',
'edituserprofile' => '/Blah.pl?b=,v=memberpanel,a=view,u='
);

// Group ids
$this->admingroups = array(1);
$this->guestgroup 3;

// Connect to db
$this->connect($CONFIG['link_id']);

}

// definition of how to extract id, name, group from a session cookie
function session_extraction()
{
return false;
}

// definition of how to extract an id and password hash from a cookie
function cookie_extraction()
{
if (isset($_COOKIE['eblah_un']) && isset($_COOKIE['eblah_pw'])){
return array($this->get_user_id($_COOKIE['eblah_un']), $_COOKIE['eblah_pw']);
}

return false;
}

// View user profile
function view_profile($uid)
{
$this->redirect($this->page['edituserprofile'].$this->get_user_name($uid $uid USER_ID));
}

// Edit user profile
function edit_profile($uid)
{
$this->redirect($this->page['edituserprofile'].$this->get_user_name($uid));
}

// definition of actions required to convert a password from user database form to cookie form
function udb_hash_db($password)
{
return crypt($password$_COOKIE['eblah_pw']);
}

// Login
function login_page()
{
$this->redirect('/Blah.pl?,v=login');
}

// Logout
function logout_page()
{
$this->redirect('/Blah.pl?,v=login,p=3');
}

function get_user_id($username)
{
static $x false;

$username addslashes($username);

$sql "SELECT {$this->field['user_id']} AS user_id FROM {$this->usertable} WHERE {$this->field['username']}  = '$username'";

$result cpg_db_query($sql$this->link_id);

if (mysql_num_rows($result)) {
$row mysql_fetch_array($result);
mysql_free_result($result);
return $row['user_id'];
} else {
if (!$x){
$x =  true;
$this->sync_users();
$id 0;
$id $this->get_user_id($username);
return $id;
}
}
return 0;
}

function synchronize_groups()
{
parent::synchronize_groups();
$this->sync_users();
}

function sync_users()
{
$data file($this->datapath 'List.txt');

foreach ($data as $name){
$name trim($name);
$info file($this->datapath "$name.dat");
$info array_map('trim'$info);

list($password$username$email,,$rank) = $info;
$user_group $rank === 'Administrator' 2;
cpg_db_query("INSERT IGNORE INTO {$this->usertable} (`user_name`, `user_password`, `user_email`, `user_active`, `user_group`) VALUES ( '$username', '$password', '$email', 'YES', $user_group)");
}
}
}

// and go !
$cpg_udb = new cpg_udb;
?>

« Last Edit: July 23, 2005, 12:36:00 pm by GauGau »
Logged

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4. bridge Bug?
« Reply #1 on: June 30, 2005, 10:42:49 pm »

If you would like to see what I am talking about here is a link the web site
http://www.icducks.com/Photo/  Bridge Wizard is enabled also

test
test

Thank you
Logged

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4. bridge Bug?
« Reply #2 on: July 12, 2005, 05:13:46 am »

Is anyone looking at this?
Logged

Nibbler

  • Guest
Re: CPG 1.4. bridge Bug?
« Reply #3 on: July 12, 2005, 03:59:45 pm »

I can't get eblah to install, if/when I do I will investigate.
Logged

Nibbler

  • Guest
Re: CPG 1.4. bridge Bug?
« Reply #4 on: July 12, 2005, 06:43:13 pm »

Commited a bunch of fixes to cvs, still mainly lacking support for encrpyted passwords and group importing.
Logged

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4. bridge Bug?
« Reply #5 on: July 13, 2005, 06:21:02 pm »

Thanks
Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. bridge Bug?
« Reply #6 on: July 20, 2005, 08:22:46 am »

I can't get eblah to install, if/when I do I will investigate.

There's a MOD you may have to apply to E-Blah, and that's to edit Setup.pl and change all the text that refers to Chmod 777 & 0777 to 755 & 0755 else it will hang on a server that doesn't allow 777...

Prior to install.... only CHMOD Setup.pl and Blah.pl to 755 and Settings.pl to 666 the rest is set by the Setup routine. Hence the need to change the chmod values. ;)


Looking forward to you solving this problem, as I came here to ask the same question..  :\'(
Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. bridge Bug?
« Reply #7 on: July 20, 2005, 12:03:10 pm »

Commited a bunch of fixes to cvs, still mainly lacking support for encrpyted passwords and group importing.

You may like to be aware of some changes that E-Blah made to cookie-handling.... and didn't tell anyone.

The E-Blah cookie prefix has changed, it used to be blahname and blahpass, it is now eblah_un and eblah_pw

Logged

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4. bridge Bug?
« Reply #8 on: July 21, 2005, 03:52:40 am »

Yes,
 They did change them (cookie prefix) I have changed them in the code I posted for everyone in the
E-Blah.inc.php 
Logged

Nibbler

  • Guest
Re: CPG 1.4. bridge Bug?
« Reply #9 on: July 21, 2005, 04:00:46 am »

Logged

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4. bridge Bug?
« Reply #10 on: July 21, 2005, 06:07:00 am »

It still does not work.  When You are logged in on the forum you can not log on to CPG.   BUT If you are logged out of the forum and then goto CPG it tells you that you are logged in as Mr. X.   :-\\

also it will not redirect back to CGP after login. 
« Last Edit: July 21, 2005, 06:24:48 am by frtaz »
Logged

Nibbler

  • Guest
Re: CPG 1.4. bridge Bug?
« Reply #11 on: July 21, 2005, 04:18:14 pm »

Well it obviously works fine for me, so please post more details, link, test account, etc.
Logged

frtaz

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: CPG 1.4. bridge Bug?
« Reply #12 on: July 21, 2005, 04:49:33 pm »

Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. bridge Bug?
« Reply #13 on: July 22, 2005, 09:52:19 am »

Well it obviously works fine for me, so please post more details, link, test account, etc.

Hi Nibbler,

I'll set up a whole new fresh install again with the latest eblah.inc.php, and if I still can't get it to work... I'll PM you the Password / Address for both the FTP address and Forum Admin.. if that's Ok with you ??

This is driving everyone nuts... :)
Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. and eblah bridge Bug?
« Reply #14 on: July 22, 2005, 11:35:39 am »

Hi again,

To put everyone's mind at rest, the bridge works.

Big THANKS to Nibbler.

BUT! it has a bug in it...

I made so many changes that I will have to re-install eblah and Coppermine to determine if the bug is a genuine one or just an oversight.

So hang in there people........ it works!. It just needs a bit of tweaking. :)
Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. bridge Bug?
« Reply #15 on: July 23, 2005, 12:21:05 am »

I'm not sure if this was / is a bug, or just a quirk from mixing Perl, php and MySQL ?

Whatever name is used to install Coppermine is lost to any type of access once the install and bridging is complete. ??

It doesn't stop Coppermine from recognising the Board once the install is completed, and actually hands over the Coppermine Admin privileges to the Admin of the E-blah board.

Quirky.... The name one uses to install Coppermine with, becomes unavailable after the 'bridging' install.


Off-Topic:

And Brother!, am I having some trouble accessing this board to post this message. I may as well be on 2400bps, that's when I can manage to hold onto your server ??
Logged

Nibbler

  • Guest
Re: CPG 1.4. bridge Bug?
« Reply #16 on: July 23, 2005, 12:35:52 am »

That's normal. It is the same for all bridges.
Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. bridge Bug?
« Reply #17 on: July 23, 2005, 12:23:03 pm »

That's normal. It is the same for all bridges.

Hi Nibbler,

Not quite right... Here's some bridging instructions for MyBB RC-4 that I wrote, and it contradicts the install for E-Blah ??


Quote:

And like Coppermine who repeat their instructions in RED to emphasise them.

YOU SHOULD USE YOUR MyBB ADMIN NAME AND PASSWORD WITH COPPERMINE ALSO! (Am I Serious..?? YES)

Continued:...............


Fill in User Name / Password / Email etc. (Good idea to use the same ADMIN NAME & PASSWORD as your MyBB otherwise you WILL run into problems once it's bridged)

E O Quote.

The Mod for MyBB here.... >>

http://www.mybboard.com/community/showthread.php?tid=2922

And that's why it became a problem with E-Blah.... because it was opposite of what I found with MyBB ???

Doesn't matter......... You've done a great job, it's merely a technicality (Problem between Keyboard and back of chair), and it's solved.

Thanks for your help.


PS: Could you change the header on this thread to include 'eblah', as it was by chance that I came across it when I came to ask the same question...
« Last Edit: July 23, 2005, 01:04:05 pm by Ozidave »
Logged

Nibbler

  • Guest
Re: CPG 1.4. bridge Bug? [eblah]
« Reply #18 on: July 23, 2005, 04:43:57 pm »

You don't have to use the same admin username and password for the forum as for Coppermine, if the MyBB bridge requires this then please submit a bug report. :)
Logged

Ozidave

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: CPG 1.4. bridge Bug? [eblah]
« Reply #19 on: July 25, 2005, 12:09:35 am »

Will do,

But there's a software upgrade happening for a new release of MyBB... Will wait until that's released and see if there are any problems.  ;)

Thanks for your response, as it's made it clearer of what is and what is not required.  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 20 queries.