How to handle a LSAH in user entered filename on mobile?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
Hi friends,

the subject says it all :-)

User entered a filename with a SLASH -> ddd/uuu.whatever
How should this be handled on mobile iOS/Android?

Escape with a BACKSLASH? -> ddd\/uuu.whatever
Replace with what?

On the Mac this is obviously replaced with a colon -> ddd:uuu.whatever
At least this is the way it appears in -> the files("folder with that file")

Any hints appreciated, thank you!


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
Am 20.05.2018 um 18:25 schrieb Klaus major-k via use-livecode <[hidden email]>:
>
> Hi friends,
>
> the subject says it all :-)

well, obviously NOT, sorry, tiny typo in the subject, I am talking about the SLASH! 8-)

> User entered a filename with a SLASH -> ddd/uuu.whatever
> How should this be handled on mobile iOS/Android?...

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
And here I was feeling like a moron for not knowing what LSAH stood for! :-)

Bob S


> On May 20, 2018, at 09:29 , Klaus major-k via use-livecode <[hidden email]> wrote:
>
> Am 20.05.2018 um 18:25 schrieb Klaus major-k via use-livecode <[hidden email]>:
>>
>> Hi friends,
>>
>> the subject says it all :-)
>
> well, obviously NOT, sorry, tiny typo in the subject, I am talking about the SLASH! 8-)
>
>> User entered a filename with a SLASH -> ddd/uuu.whatever
>> How should this be handled on mobile iOS/Android?...
>
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Not sure about Mobile, but I was under the impression that Livecode handled path conversion internally if forward slashes were used. There are also path conversion functions. I usually check the platform, then do some basic checks for formatting and pop an error if invalid. I also filter for valid characters, and if the source string doesn't match the result, I pop an error.

Bob S


> On May 20, 2018, at 09:25 , Klaus major-k via use-livecode <[hidden email]> wrote:
>
> Hi friends,
>
> the subject says it all :-)
>
> User entered a filename with a SLASH -> ddd/uuu.whatever
> How should this be handled on mobile iOS/Android?
>
> Escape with a BACKSLASH? -> ddd\/uuu.whatever
> Replace with what?
>
> On the Mac this is obviously replaced with a colon -> ddd:uuu.whatever
> At least this is the way it appears in -> the files("folder with that file")
>
> Any hints appreciated, thank you!
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Hi Bob,

> Am 29.05.2018 um 19:09 schrieb Bob Sneidar via use-livecode <[hidden email]>:
>
> And here I was feeling like a moron for not knowing what LSAH stood for! :-)

for nine whole days? Poor boy! :-D

Looks like other felt the same, at least I did not get any response.

> Bob S
>
>
>> On May 20, 2018, at 09:29 , Klaus major-k via use-livecode <[hidden email]> wrote:
>>
>> Am 20.05.2018 um 18:25 schrieb Klaus major-k via use-livecode <[hidden email]>:
>>>
>>> Hi friends,
>>> the subject says it all :-)
>> well, obviously NOT, sorry, tiny typo in the subject, I am talking about the SLASH! 8-)
>>> User entered a filename with a SLASH -> ddd/uuu.whatever
>>> How should this be handled on mobile iOS/Android?...

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
In reply to this post by Niggemann, Bernd via use-livecode
Hi Bob,

> Am 29.05.2018 um 19:14 schrieb Bob Sneidar via use-livecode <[hidden email]>:
>
> Not sure about Mobile,

but I need to know for mobile!

> but I was under the impression that Livecode handled path conversion internally if forward slashes were used. There are also path conversion functions. I usually check the platform, then do some basic checks for formatting and pop an error if invalid. I also filter for valid characters, and if the source string doesn't match the result, I pop an error.

My customer and I decided to not allow a SLASH in filenames on mobile in the end.

> Bob S
>
>> On May 20, 2018, at 09:25 , Klaus major-k via use-livecode <[hidden email]> wrote:
>>
>> Hi friends,
>>
>> the subject says it all :-)
>>
>> User entered a filename with a SLASH -> ddd/uuu.whatever
>> How should this be handled on mobile iOS/Android?
>>
>> Escape with a BACKSLASH? -> ddd\/uuu.whatever
>> Replace with what?
>>
>> On the Mac this is obviously replaced with a colon -> ddd:uuu.whatever
>> At least this is the way it appears in -> the files("folder with that file")
>>
>> Any hints appreciated, thank you!

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
OIC you wanted to INCLUDE a slash in the filename, not enter a path! Ick. Yeah good choice to exclude them. Anytime you allow a user to enter a filename and/or a path you have to check for valid characters.

Many years ago I had a gal who used a character that was legal on a Mac, but not on a Windows NTFS volume. She would save her files from a Mac to a Windows file share, and Windows would happily comply, but then she couldn't open her files! (No one at Microsoft actually thought to  check for incoming file names from a foreign file system!) There are (or were) utilities that do nothing more than find illegal file names on NTFS volumes and fix them.

Bob S


> On May 29, 2018, at 10:42 , Klaus major-k via use-livecode <[hidden email]> wrote:
>
> My customer and I decided to not allow a SLASH in filenames on mobile in the end.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: How to handle a LSAH in user entered filename on mobile?

Niggemann, Bernd via use-livecode
On 05/31/2018 07:54 AM, Bob Sneidar via use-livecode wrote:

> Many years ago I had a gal who used a character that was legal on a Mac, but not on a Windows NTFS volume. She would save her files from a Mac to a Windows file share, and Windows would happily comply, but then she couldn't open her files! (No one at Microsoft actually thought to  check for incoming file names from a foreign file system!) There are (or were) utilities that do nothing more than find illegal file names on NTFS volumes and fix them.

LOL. Some years ago I managed to insert a Windows filename that had a
space as its last character. It would show up in directory lists but was
otherwise completely inaccessible. Nothing I tried on my own, and none
of the utilities I tried would either open it or delete it. The file
stayed on the hard disk until the system finally died.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode