Another funny character complication...

A historical forum for issues reported in the suggestions and bugs forum that have been subsequently fixed or resolved.
Post Reply
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Another funny character complication...

Post by MatsP »

has one owner, "AM&e". It is not possible to see what other fish this user keeps, because the "URL parser" gets it wrong due to the & seen as a separator.

Using Am%26e shows the fish of the user...

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

This still needs fixing.

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

I'm looking into fixing this...

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

Ok, got some progress, but it's not working all the way, so will continue tomorrow.

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

I tried fixing this, but I couldn't quite make it work. I will work more on it.

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

Fix in R492 + R493. However, my_blog and my_fish needs fixing too.

Edit: Alos, for this to work, it requires a change to forum/functions.php, which I haven't submitted!

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

MatsP wrote:Edit: Alos, for this to work, it requires a change to forum/functions.php, which I haven't submitted!
Yikes. OK, that one needs to be documented like other forum mods with lots of white space around the change. It is also helpful to keep in the original phpBB code in a comment in case it gets altered over time.

Cheers,

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

The other solution is to not pass the user-name around to the My Aquaria/My Cats/My Blog, but us a (unique throughout AR) integer ID. (Problem is that usernames can contain & - which gets chopped off when we get the useranme from the URL as that's the "sign" of another parameter...

I think the change is in an "PC addition already" section, so it shouldn't really be that much of a change.

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

Or:

Disallow user names with an & in them at source + one off removal of them site wide.

Use an MD5 hash as the integer.

Have a function that just replaces & with something safe everywhere.

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

I have written a function that replaces the & with %26 (and % with %25), called enconde_for_url (and decode_from_url to convert it back).

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

Yeah, I though that. But it's all a one function right? So we could choose other translations in future?

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

Yes, one function to "encode" and one for "decode". See common/functions/encode_for_url.php, and yes, it's pretty easy to extend (and it uses the standard %xx method used by many web-sites to encode characters in the URL.

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

And the functions.php changes are in R496. Aside from the "require_once" at the beginning of the file, it's all withing existing "pc" specific bits.

I think I need to change the code that goes on the side of the posts too, tho'.

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

Hmm. Seems to not be working, although it was working a few minutes ago...

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

Latest version now online (and thanks for the cotm image fix - I forgot that this month, first time ever!). Is this now resolved?

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

I suspect the admin control panel won't work for you... :(

But if you put a $phpBB_root in the "functions.php".

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

MatsP wrote:But if you put a $phpBB_root in the "functions.php".
I don't really understand this - can we pick it up by email and resolve this topic?

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

I'll have a fix by tonight, so will let you know.

--
Mats
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

R. 499 contains fix to allow including from the correct location whereever "functions.php" is included.

I will have further fixes for the my_* bits later on (mainly waiting for a reply to an e-mail regarding something I spotted).

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

R499 now online.

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

There is still a problem when going from the Cat-eLog page to the user, and in the page that lists all owners of the species.

Fix in R516.

--
Mats
User avatar
Jools
Expert
Posts: 16274
Joined: 30 Dec 2002, 15:25
My articles: 198
My images: 941
My catfish: 237
My cats species list: 87 (i:13, k:1)
My aquaria list: 21 (i:13)
My BLogs: 7 (i:10, p:167)
My Wishlist: 23
Spotted: 450
Location 1: Middle Earth,
Location 2: Scotland
Interests: All things aquatic, Sci-Fi, photography and travel. Oh, and beer.
Contact:

Re: Another funny character complication...

Post by Jools »

MatsP wrote:Fix in R516.
Online - all resolved?

Jools
User avatar
MatsP
Posts: 21038
Joined: 06 Oct 2004, 13:58
My articles: 4
My images: 28
My cats species list: 117 (i:33, k:0)
My aquaria list: 12 (i:10)
My BLogs: 4 (i:0, p:164)
Spotted: 187
Location 1: North of Cambridge
Location 2: England.

Re: Another funny character complication...

Post by MatsP »

Yup, now resolved.

--
Mats
Post Reply

Return to “All Resolved Issues”