Help - Search - Members - Calendar
Full Version: Delete dropdown history?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Squeller
Is it possible to delete the dropdown history of the "Playlist Add location"? Its saved in the foobar2000.conf.
miscellanea
That's also what I wanted to do. I'm afraid currently it's impossible.
Squeller
Yep. I edited the foobar2000.conf with a hex editor. IIRC even if I just edited one char, the conf file became broken.
kalmark
QUOTE(Squeller @ May 7 2005, 02:41 PM)
Yep. I edited the foobar2000.conf with a hex editor. IIRC even if I just edited one char, the conf file became broken.
*


I tried to do the same recently for some other reason, and my config file broke too. I guess there's some checksum involved smile.gif
miscellanea
QUOTE(kalmark @ May 7 2005, 11:06 PM)
QUOTE(Squeller @ May 7 2005, 02:41 PM)
Yep. I edited the foobar2000.conf with a hex editor. IIRC even if I just edited one char, the conf file became broken.
*


I tried to do the same recently for some other reason, and my config file broke too. I guess there's some checksum involved smile.gif
*


I did the same thing too tongue.gif and got the same result biggrin.gif
Squeller
QUOTE(kalmark @ May 7 2005, 06:06 AM)
I guess there's some checksum involved smile.gif
smile.gif? sad.gif!
miscellanea
QUOTE(kalmark @ May 7 2005, 11:06 PM)
I guess there's some checksum involved smile.gif
*


I think so. First, I simply deleted URL in foobar2000.cfg by binary editor, and started foobar2000, then it returns to default. Second, I overwrote URL with space, and the result was the same. Third, overwrote with "00", but nothing changed. tongue.gif
Squeller
Absolutely. And its not a simple sum.
I changed two Hex values in from the add location entries

from: 72 65
to: 71 66

And even this did result in a brand new config file.
kalmark
QUOTE(Squeller @ May 9 2005, 10:55 AM)
Absolutely. And its not a simple sum.
I changed two Hex values in from the add location entries

from: 72 65
to: 71 66

And even this did result in a brand new config file.
*



I meant "checksum" not as a real sum of all the hex values in the file smile.gif I guess it should be thought of rather like a CRC or MD5 identifier of the data. Simply adding up all the hex values would not help a lot in validating the config file...
ssamadhi97
QUOTE(Squeller @ May 9 2005, 11:55 AM)
Absolutely. And its not a simple sum.
I changed two Hex values in from the add location entries

from: 72 65
to: 71 66

And even this did result in a brand new config file.
*


fyi pretty much all serious checksum/hashing algorithms are designed to catch this kind of modification (otherwise they'd be pretty pointless tongue.gif)
Squeller
Of course. But I wouldn't see the need of using a cryptograhically strong hash function like sha<n> or md5 or whatever. Just to prevent manual foobar2000.conf editing???
kalmark
QUOTE(Squeller @ May 9 2005, 11:46 AM)
Of course. But I wouldn't see the need of using a cryptograhically strong hash function like sha<n> or md5 or whatever. Just to prevent manual foobar2000.conf editing???
*


This is quite restricting for us right now, but look at the developers side. If you try to load a config file, you have to be sure that you want to use correct values from that file. Of course, your own plugin wrote correct values, i.e. only numbers in integer fields. But, if someone changes the config file outside foobar, he can write any value there, and this value could coast the whole loading process.
So, there are basically 2 solutions: one is to check each and every loaded value if it!s the correct type, in the correct range, whatever. The other is some function to check if the config file has been tampered with, and if yes, use the default values. So, if there are, say, 100 settings (which is quite possible with foobar), in the first case you'd need at the very least 100 checks, maybe even plugin devs should write some for themselves, and in the second case, only one check. This "only one" check can be CPU intensive, but it's easier to check if it works correctly, and less prone to developer typos.

I hope what I said above is clear and valid at the same time smile.gif
Peter
It's more about preventing complete disaster after shutdown crash than keeping users from trying to edit. In worst case scenario, corrupted configuration file after shutdown problems could cause non-bad-data-safe component to keep crashing on startup. With simple checksum, they always get back what they wrote and not something else.
As for dropdown history issue, you should see a solution for that soon enough.
Squeller
QUOTE(zZzZzZz @ May 9 2005, 03:43 AM)
As for dropdown history issue, you should see a solution for that soon enough.

Thanks zZzZzZ. FYI I didn't check if there might be other histories which users might want to have deleted...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.