Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2010-03-07 13:13:05

agita
Member
Registered: 2010-02-28
Posts: 39

Skype messaging and external avatar url

Are there any chances that in Profile/Messaging would be added Skype field and also allow to use external avatar url besides uploading them on server?

Offline

#2 2010-03-07 13:16:03

Reines
Lead developer
From: Scotland
Registered: 2008-05-11
Posts: 3,165
Website

Re: Skype messaging and external avatar url

The messaging fields probably should be sorted out. I think for 2.0 we might aim to make them custom, rather than hard coding a few specific fields.

Regarding avatars, I'm sure there is a mod for this but I'm not keen on adding it to the core because you cannot check enforce size/dimension limits of remote images.

Offline

#3 2010-03-07 13:21:45

agita
Member
Registered: 2010-02-28
Posts: 39

Re: Skype messaging and external avatar url

Actualy i either think that messaging is absolutley not necessary. Thanks for reply.

Offline

#4 2010-03-07 13:34:04

Reines
Lead developer
From: Scotland
Registered: 2008-05-11
Posts: 3,165
Website

Re: Skype messaging and external avatar url

Yeah removing them totally would be another good option, I don't think anyone actually uses them anyway...

Offline

#5 2010-03-07 13:40:37

Paul
Developer
From: Wales, UK
Registered: 2008-04-27
Posts: 1,630

Re: Skype messaging and external avatar url

An alternative option is to get rid of the messaging fields but add a short generic "Other information" field rather like a signature where people can give some more information about themselves including their contact details if they wish.


The only thing worse than finding a bug is knowing I created it in the first place.

Offline

#6 2010-03-07 13:44:55

agita
Member
Registered: 2010-02-28
Posts: 39

Re: Skype messaging and external avatar url

Not bad idea, Paul. At least more useful than it is made now.

Offline

#7 2012-02-19 21:51:56

Newman
Member
Registered: 2011-11-05
Posts: 249

Re: Skype messaging and external avatar url

Reines wrote:

The messaging fields probably should be sorted out. I think for 2.0 we might aim to make them custom, rather than hard coding a few specific fields.

Regarding avatars, I'm sure there is a mod for this but I'm not keen on adding it to the core because you cannot check enforce size/dimension limits of remote images.

cCurl u can?

lol

Offline

#8 2012-02-20 03:02:06

Smartys
Former Developer
Registered: 2008-04-27
Posts: 3,135
Website

Re: Skype messaging and external avatar url

No, you can't reliably check remote images without caching a copy locally, unless you want to open yourself up to a whole host of issues.

Offline

#9 2012-02-20 15:57:22

Newman
Member
Registered: 2011-11-05
Posts: 249

Re: Skype messaging and external avatar url

Smartys wrote:

No, you can't reliably check remote images without caching a copy locally, unless you want to open yourself up to a whole host of issues.


so this is a unsecure script?

 $file = $ibforums->input['url_avatar'];

    $ch = curl_init($file);
    curl_setopt($ch, CURLOPT_NOBODY, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HEADER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

    $data = curl_exec($ch);
    curl_close($ch);

    if (preg_match('/Content-Length: (\d+)/', $data, $matches)) {

        // Contains file size in bytes
        $contentLength = (int)$matches[1];
    }
	if ($contentLength >= 51200){
	$std->Error2("Maximum allowed Image size is 50 kilobytes... Please lower your avatar size.");
	exit;
	}else{

	}

I used to use this on my old forum system, worked wonderful?

Ofcourse I DB escape, and etc before i enter into db, but this very reliable?


How can a user bypass this if it checks it by the server? yikes

Last edited by Newman (2012-02-20 15:57:47)

Offline

#10 2012-02-21 09:55:27

Reines
Lead developer
From: Scotland
Registered: 2008-05-11
Posts: 3,165
Website

Re: Skype messaging and external avatar url

Newman wrote:

How can a user bypass this if it checks it by the server? yikes

Depends when you check it, and how hard the user tries to bypass it. If you just check when they set the avatar, simply bypass by changing the file that is at that URL afterwards. If it checks every time the avatar is used, then that is horrible performance wise and will upset your users very fast.

If a user wanted, they could also avoid it by checking the user-agent/IP on their server and redirecting your script to a fake image.

Offline

Board footer

Powered by FluxBB 1.5.0