Bug - Fixed Changing clan member rank/titles improperly url-encodes titles

zarqon

Well-known member
If I were to change a clan member's title, ALL the titles will be edited because mafia improperly url-encodes the data.

For example, I change a rank. My title was previously "Severe Storm Knight".

Now, not only is my title "Severe+Storm+Knight", but every title that I am allowed to edit changes similarly. If I have to make further changes, these already-url-encoded titles will be url-encoded again, eventually resulting in lots of %2026B gibberish between words, and getting long titles truncated.

Tested in vanilla KoL, this problem does not happen.
 

Veracity

Developer
Staff member
I just experimented with this and I am clueless about what you are talking about. Since you tested vs. "vanilla KoL", it must be something in the Relay Browser.

I went to my clan in the Relay Browser. I changed various titles. They all changed to what I told them to change to.

Considering that when the Browser submits URLs, KoLmafia simply passes them on through untouched, that is exactly what I expected.

I guess that you have some sort of Relay override script for the clan page. There have been issues with url encoding of stuff in relay override scripts. Looking through the commit log, I see, for example:

8940: "Fix three-argument version of visit_url to actually obey the 2nd and 3rd arguments when called from a relay override script."
8882: "Now that relay form fields are no longer being double-URLencoded, don't double-decode them either - which made plus signs unusable in text fields."
8785: "When setting up relay request for use by a relay override script, clone the URL correctly: allow for requests submitted by either GET or POST, and recognize that the arguments are already URL encoded."

All of those were submitted after you made this bug report.

As I said, it's just a guess that they might be relevant, since you didn't use the words "relay script" anywhere in your bug report. Was that the issue, and does your relay script work correctly now?
 

zarqon

Well-known member
Wow, that's an old one!

I just tested -- unable to duplicate this bug anymore. I was using a relay override, but it only added an extra column to the table with some extra information, it didn't submit any data or alter any of the form data.

So, thanks for fixing this... at some point... in the past...? :)
 

Veracity

Developer
Staff member
I was just glancing at what we had 50 or 70 pages back in the bug list, and I saw the occasional gem - and a variety of things that I ignored back then and am happy to keep ignoring. I'll mark this fixed.
 
Top