Use pun_include to a file in the user directory that simply includes your coppermine file relative to PUN_ROOT

Your Apache access logs may help you, and PunBB 1.3 stores who creates a ban, but other than that there isn't a way.

2,003

(3 replies, posted in PunBB 1.2 show off)

Moved to Show Off

A bit of feedback for you:

In the admin plugin:

    while (list($id, $set) = @each($allow_read))
    {
        $db->query('UPDATE '.$db->prefix.'groups SET g_read_project='.$set.' WHERE g_id=\''.$id.'\'') or error('Unable to change permissions.', __FILE__, __LINE__, $db->error());
    }

$set is not intval'ed like everywhere else: SQL inject

For all the code like that, $id is a number as well but is treated like a string (and not escaped properly, which allows for SQL injects).

        $less=0;
        $db->query("DELETE FROM {$db->prefix}project WHERE id>{$less}")
                or error('Unable to delete a type', __FILE__, __LINE__, $db->error());

A. Out of curiosity, what's up with the use of {}?
B. Why not just do >0 instead of defining a variable to be a constant and using it in the next line?

<th scope="row"><?php echo $cur_group['g_title'] ?></th>

XSS, pun_htmlspecialchars needs to be called on the title

---

Now, project.php

if ($is_admmod)

I see that used a lot, but I never see it initialized anywhere. Where is it initialized?

if (isset($_POST['form_add']))
{    
    $result = $db->query('SELECT * FROM '.$db->prefix.'project') or error('Unable to fetch project list', __FILE__, __LINE__, $db->error());
    $cur_todo = $db->fetch_assoc($result);
    $id = $cur_todo['id'];
if (isset($_POST['form_del']))
{    
    $result = $db->query('SELECT * FROM '.$db->prefix.'project') or error('Unable to fetch project list', __FILE__, __LINE__, $db->error());
    $cur_todo = $db->fetch_assoc($result);
    $id = $cur_todo['id'];

As far as I can see, this code is entirely unnecessary (not the if/else if, the query).

if (isset($_POST['form_edit']))
{    
    $project_id = $_POST['id'];
    
    $result = $db->query('SELECT * FROM '.$db->prefix.'project WHERE id='.$project_id.'') or error('Unable to fetch project list', __FILE__, __LINE__, $db->error());
    $cur_project = $db->fetch_assoc($result);
    $id = $cur_project['id'];

SQL inject, $project_id is never properly sanitized

$result = $db->query('SELECT id, owner FROM '.$db->prefix.'project WHERE id='.$_GET['del'].'') or error('Unable to fetch project list', __FILE__, __LINE__, $db->error());

Another SQL inject, $_GET['del'] is being used directly. You sanitize it for $del a few lines later: that should be moved up and you should use $del.

The actual form processing stuff (add, edit, delete) never checks for permission. That's only done when displaying the HTML. It needs to be done in both places.

<input type="hidden" name="delete_project" value="<?php echo $_GET['del']?>">
<h2><?php echo $lang_project['edit'] ?> - <?php echo $cur_project['subject']?></h2>
<input type="hidden" name="id" value="<?php echo $_GET['edit']?>"/>
            if ($project_data['owner'] == $pun_user['id'] || ($pun_user['g_id'] == PUN_ADMIN || ($pun_group['g_project_edit'] == '1'))){
                echo '<p><a href="project.php?edit='.$_GET['adv'].'">'.$lang_project['edit'].'</a></p>';
            }
            if ($project_data['owner'] == $pun_user['id'] || ($pun_user['g_id'] == PUN_ADMIN || ($pun_group['g_project_delete'] == '1'))){
                echo '<p><a href="project.php?del='.$_GET['adv'].'">'.$lang_project['delete'].'</a></p>';
            }
<h2><span><?php echo $lang_project['current work'].' - '.$project_data['subject'] ?></span></h2>
<div class="block" style="width:15%;">
    <h2><?php echo $lang_project['workers'] ?></h2>
    <div class="box">
        <div class="inbox">
            <div>
            <?php        
            echo '<p>'.$project_data['workers'].'</p>';
            ?>
            </div>
        </div>
    </div>
</div>
<td class="tcl"><h3 class="toggler introduction"><a><?php echo $project_data['subject'] ?></a></h3></td>
<td><?php echo $project_data['workers'];?></td>
<p><?php echo "$newtext\n"; ?></p>
            <td class="tcl"><h3 class="toggler introduction"><a><?php echo $project_data['subject'] ?></a></h3></td>
            <td><?php echo $project_data['workers']; ?></td>
<p><strong><?php echo $lang_project['description'] ?>:</strong></p>
<p><?php echo "$project_info_short\n"; ?></p>

XSS

I don't think I caught everything, so don't take this as a comprehensive review wink
I also think you could benefit from splitting project.php into several files (create_project.php, edit_project.php, delete_project.php, etc).

2,005

(17 replies, posted in PunBB 1.2 troubleshooting)

I can't tell any more about it without actually having access to the forum. Email me, smartys at this domain.

2,006

(17 replies, posted in PunBB 1.2 troubleshooting)

Try removing all the cache files then
What does the URL look like when you click that link?

2,007

(17 replies, posted in PunBB 1.2 troubleshooting)

Try uploading a fresh copy of admin_forums.php and header.php

2,008

(17 replies, posted in PunBB 1.2 troubleshooting)

I have no idea what it would be, I would need to see a screenshot.
And you haven't edited admin_forums.php, right?

2,009

(17 replies, posted in PunBB 1.2 troubleshooting)

When you actually click the edit link, as opposed to just visiting the page?

FIND

    if ($pun_user['g_id'] > PUN_ADMIN)
        message($lang_common['No permission']);

REPLACE WITH

    if ($pun_user['g_id'] > PUN_ADMIN && $pun_user['id'] != $id)
        message($lang_common['No permission']);

FIND

if (isset($_POST['delete_posts']))

REPLACE WITH

if (isset($_POST['delete_posts']) && $pun_user['g_id'] == PUN_ADMIN)

That way, you can only delete a user if you're an administrator or it's your account, and you can only delete posts if you're an administrator.

Or you could allow users to delete their own accounts without deleting their posts by editing two lines of the code you pasted above. You could then either provide a proper form setup on your own or alter profile.php more to show the delete option.
And I have to agree with Paul, I wouldn't equate not being able to delete an account to being trapped. Nobody forces you to keep visiting a website.

2,012

(17 replies, posted in PunBB 1.2 troubleshooting)

Did you fix both problems?

2,013

(17 replies, posted in PunBB 1.2 troubleshooting)

From install.php

            $sql = 'CREATE TABLE '.$db_prefix."search_words (
                    id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
                    word VARCHAR(20) BINARY NOT NULL DEFAULT '',
                    PRIMARY KEY (word),
                    KEY ".$db_prefix."search_words_id_idx (id)

Sounds like you're missing auto_increment, and the primary key is set incorrectly.

2,014

(15 replies, posted in PunBB 1.2 bug reports)

I do too, I'm still waiting for a reply wink

Peter wrote:

Why isn't there a delete option for users?

Because deleting is an administrative/maintenance action that can have effects on the entire board.

Don't do what Matt said. That would mean anybody could delete anybody.
You can't just remove the admin restriction from the permissions check, you need to also allow a user to delete his/her own account.
And when I said copy/paste the code, I meant copy/paste the code to your own script, since I assumed that was what you were doing.
You're right that there's no delete option for users: because there isn't tongue

Just copy/paste it? tongue

2,018

(124 replies, posted in News)

NyteOwl wrote:

teh giveaway was just a comment that it was the same folks. I see your point. Just the red flagging raised some concerns - especially from a company that appears to have no other presence that comes up and is (though it shouldn't be a concern) from a relatively obscure part of the world smile

Oh, I completely understand: like I said, we bought up the same issues with them smile

2,019

(124 replies, posted in News)

NyteOwl wrote:

Intereesting because the freedownloadmanager.org site also is(was?) geting flagged red by McAfee's SiteAdvisor. Same folks then as giveawayoftheday.com.

And that's another issue we noticed and brought up beforehand tongue
Read the comments for freedownloadmanager.com. Also, try viewing some of the "red" files and looking at the "download publisher url." It's a site for people to upload shareware, and some people upload malware. They have software in place to detect and deal with malware and from everything I can see, it's working: if you try and go to those URLs, you can't access the malware through their site. And giveawayoftheday comes up green for me.

2,020

(17 replies, posted in PunBB 1.2 troubleshooting)

Enable debug mode, paste the full error

2,021

(124 replies, posted in News)

NyteOwl wrote:

What I would like to ask is whether the new owner is the same SoftDeluxe that owns the Free Download Manager product (also GPLed) that is listed on SpyWare Guide?

Yes. That's actually a site we came across as well, when we were first discussing the agreement. Paul pointed out that there are similar company listings on that site for Opera, Macromedia, Mozilla, Agnitum, Kaspersky, Kerio, Iomega, mIRC, MySpace, Netscape, Sun Microsystems, SpyBot, steganos, Toshiba, Winzip, ZoneLabs, etc. wink
In other words, a company listing there is not indicative of spyware. In this case, it's indicative that the software "phones home" at some point (to check for updates, validate a license key, etc).

Oh, right. 9999 probably won't work because it's greater than the timeout for an entry in the online table. As soon as the online table entry goes away, the last posted time goes away.

2,023

(6 replies, posted in General discussion)

Are you sure you have PunBB? That sounds like phpBB.

2,024

(15 replies, posted in PunBB 1.2 bug reports)

I've also sent you an email about this.

pingme wrote:
intedinmamma wrote:

Awesome looks (and functionality), but what happened to the PunBB copyright notice? Or am I missing something?

As per Rick, it is optional and he did not mind removing it. At least in old days wink

Rickard wrote:

As I have been getting a few questions about this, I thought it would be a good idea to straighten a few things out. FAQ inspired by a post in the phpBB community forums.


Q: May I remove the copyright from the page footer?

Yes, but please don't. If you must, please try to keep at least "Powered by PunBB" with the link to this site intact.


Q: May I add my own copyright to the page footer?

Yes, but you may not alter the original copyright in such a way that it loses it's original "meaning". It must, in other words, still be absolutely clear who is the copyright holder of PunBB. Adding an additional line with your copyright notice is ok.


Q: May I remove the copyright from the source code?

No. The copyright notice in all the source files must be left intact. Any modification or removal of this copyright is illegal under the terms of the GNU General Public Licence.