• Possible bug found for Synchronet.

    From Psi-Jack@VERT/DECKHVN2 to All on Thursday, September 25, 2014 22:49:00
    Hey Digital Man.

    I think I found an interesting bug, very minor, but very peculiar. In modifying my text.dat for my new-user prompts, I have been using a lot of @ INCLUDE: @,
    @ MENU:... @, and @ PUSHXY @, @ POPXY @ At-codes, but on prompt 499 ForwardMailQ, specifically, these are not translated but treated literal in the prompt.

    ---
    [Psi-Jack -//- Decker]

    ---
    þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com
  • From Psi-Jack@VERT/DECKHVN2 to All on Thursday, September 25, 2014 22:52:00
    Re: Possible bug found for Synchronet.
    By: Psi-Jack to All on Thu Sep 25 2014 10:49 pm

    Hey Digital Man.

    I think I found an interesting bug, very minor, but very peculiar. In modifying my text.dat for my new-user prompts, I have been using a lot of @ INCLUDE: @, @ MENU: @, and @ PUSHXY @, @ POPXY @ At-codes, but on
    prompt 499 ForwardMailQ, specifically, these are not translated but treated literal in the prompt.

    Sorry, that's @ INCLUDE, @ MENU, @ PUSHXY, @ POPXY, etc..

    Also found in prompt 350 UserInfoCorrectQ

    ---
    [Psi-Jack -//- Decker]

    ---
    þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com
  • From Psi-Jack@VERT/DECKHVN2 to All on Friday, September 26, 2014 08:28:58
    Re: Possible bug found for Synchronet.
    By: Psi-Jack to All on Thu Sep 25 2014 10:52 pm

    I think I found an interesting bug, very minor, but very peculiar.
    In modifying my text.dat for my new-user prompts, I have been using
    a lot of @ INCLUDE: @, @ MENU: @, and @ PUSHXY @, @ POPXY @
    At-codes, but on prompt 499 ForwardMailQ, specifically, these are
    not translated but treated literal in the prompt.

    Turns out this is not a bug, but it's being passed to yesnobar which is a baja script for the yes/no lightbar prompt.

    Now the question is, how do I get @-codes to actually be parsed in baja print or printf, as they are not currently..

    I tried changing the following:

    printf "^An^Ac^Ah%s? " _question

    to:

    str question
    set question "^An^Ac^Ah"
    strcat question _question
    strcat question "? "
    print question

    Which still prints the @-codes directly instead of translating the macros. Example of which looks like:

    @ MENU:newuser/newusr-emailfwd @@ POPXY @

    Without spaces of course. I was hoping that using print instead of printf may cause the translation, but it is not.

    ---
    [Psi-Jack -//- Decker]
    þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com
  • From Digital Man@VERT to Psi-Jack on Friday, September 26, 2014 16:06:55
    Re: Possible bug found for Synchronet.
    By: Psi-Jack to All on Thu Sep 25 2014 10:49 pm

    Hey Digital Man.

    I think I found an interesting bug, very minor, but very peculiar. In modifying my text.dat for my new-user prompts, I have been using a lot of @ INCLUDE: @, @ MENU:... @, and @ PUSHXY @, @ POPXY @ At-codes, but on prompt 499 ForwardMailQ, specifically, these are not translated but treated literal in the prompt.

    ForwardMailQ is a yes/no or no/yes prompt (depending on the context). What do you have for your YesNoQuestion and NoYesQuestion lines in your text.dat?

    digital man

    Synchronet "Real Fact" #33:
    The back-up synchro.net nameserver and CVS repository is hosted by Deuce. Norco, CA WX: 81.6øF, 40.0% humidity, 8 mph SSE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to Psi-Jack on Friday, September 26, 2014 16:13:27
    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to All on Fri Sep 26 2014 08:28 am

    Re: Possible bug found for Synchronet.
    By: Psi-Jack to All on Thu Sep 25 2014 10:52 pm

    I think I found an interesting bug, very minor, but very peculiar.
    In modifying my text.dat for my new-user prompts, I have been using
    a lot of @ INCLUDE: @, @ MENU: @, and @ PUSHXY @, @ POPXY @
    At-codes, but on prompt 499 ForwardMailQ, specifically, these are
    not translated but treated literal in the prompt.

    Turns out this is not a bug, but it's being passed to yesnobar which is a baja script for the yes/no lightbar prompt.

    Now the question is, how do I get @-codes to actually be parsed in baja print or printf, as they are not currently..

    I tried changing the following:

    printf "^An^Ac^Ah%s? " _question

    to:

    str question
    set question "^An^Ac^Ah"
    strcat question _question
    strcat question "? "
    print question

    Which still prints the @-codes directly instead of translating the macros. Example of which looks like:

    @ MENU:newuser/newusr-emailfwd @@ POPXY @

    Without spaces of course. I was hoping that using print instead of printf may cause the translation, but it is not.

    The Baja PRINTF function will not expand @-codes. The Baja PRINT function will expand @-codes.

    Could it be that you were mdoifying teh yesnobar.src when the prompt is actually going through noyesbar.src/bin? Or maybe you forgot to recompile the module with Baja aftering touching the .src?

    digital man

    Synchronet "Real Fact" #40:
    Synchronet's cross-platform library is called XPDEV (named before Windows XP). Norco, CA WX: 81.6øF, 40.0% humidity, 8 mph SSE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Psi-Jack@VERT/DECKHVN2 to Digital Man on Saturday, September 27, 2014 00:06:32
    Re: How to get @-codes working in yesnobar?
    By: Digital Man to Psi-Jack on Fri Sep 26 2014 04:13 pm

    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to All on Fri Sep 26 2014 08:28 am

    a lot of @ INCLUDE: @, @ MENU: @, and @ PUSHXY @, @ POPXY @
    At-codes, but on prompt 499 ForwardMailQ, specifically, these are Ps>>> not translated but treated literal in the prompt.

    Turns out this is not a bug, but it's being passed to yesnobar which
    is a baja script for the yes/no lightbar prompt.

    Now the question is, how do I get @-codes to actually be parsed in
    baja print or printf, as they are not currently..

    I tried changing the following:

    printf "^An^Ac^Ah%s? " _question

    to:

    str question
    set question "^An^Ac^Ah"
    strcat question _question
    strcat question "? "
    print question

    Which still prints the @-codes directly instead of translating the
    macros. Example of which looks like:

    @ MENU:newuser/newusr-emailfwd @@ POPXY @

    Without spaces of course. I was hoping that using print instead of
    printf may cause the translation, but it is not.

    The Baja PRINTF function will not expand @-codes. The Baja PRINT
    function will expand @-codes.

    Could it be that you were mdoifying teh yesnobar.src when the prompt is actually going through noyesbar.src/bin? Or maybe you forgot to
    recompile the module with Baja aftering touching the .src?

    Well, as you see in the above code, I changed it to use PRINT, against a variable anyway.

    To answer your questions, no. I have the yesnobar.src/bin and noyesbar.src/bin in my mods directory, overriding that what's in exec, and I made sure after my changes to the code I re-compiled the src.

    It's just not translating the @-codes from the variables at all, and printing them as-is literally just like PRINTF is.

    ---
    [Psi-Jack -//- Decker]
    þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com
  • From Digital Man@VERT to Psi-Jack on Monday, September 29, 2014 15:39:59
    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Sat Sep 27 2014 12:06 am

    Re: How to get @-codes working in yesnobar?
    By: Digital Man to Psi-Jack on Fri Sep 26 2014 04:13 pm

    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to All on Fri Sep 26 2014 08:28 am

    a lot of @ INCLUDE: @, @ MENU: @, and @ PUSHXY @, @ POPXY @
    At-codes, but on prompt 499 ForwardMailQ, specifically, these are Ps>>> not translated but treated literal in the prompt.

    Turns out this is not a bug, but it's being passed to yesnobar which
    is a baja script for the yes/no lightbar prompt.

    Now the question is, how do I get @-codes to actually be parsed in
    baja print or printf, as they are not currently..

    I tried changing the following:

    printf "^An^Ac^Ah%s? " _question

    to:

    str question
    set question "^An^Ac^Ah"
    strcat question _question
    strcat question "? "
    print question

    Which still prints the @-codes directly instead of translating the
    macros. Example of which looks like:

    @ MENU:newuser/newusr-emailfwd @@ POPXY @

    Without spaces of course. I was hoping that using print instead of
    printf may cause the translation, but it is not.

    The Baja PRINTF function will not expand @-codes. The Baja PRINT function will expand @-codes.

    Could it be that you were mdoifying teh yesnobar.src when the prompt
    is actually going through noyesbar.src/bin? Or maybe you forgot to recompile the module with Baja aftering touching the .src?

    Well, as you see in the above code, I changed it to use PRINT, against a variable anyway.

    To answer your questions, no. I have the yesnobar.src/bin and noyesbar.src/bin in my mods directory, overriding that what's in exec, and
    I made sure after my changes to the code I re-compiled the src.

    It's just not translating the @-codes from the variables at all, and printing them as-is literally just like PRINTF is.

    The Baja PRINT function followed by a variable, will not expand @-codes either (for security reasons).

    digital man

    Synchronet "Real Fact" #4:
    Synchronet version 3 for Win32 development began in 1999.
    Norco, CA WX: 79.5øF, 44.0% humidity, 3 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Psi-Jack@VERT/DECKHVN2 to Digital Man on Wednesday, October 01, 2014 08:54:18
    Re: How to get @-codes working in yesnobar?
    By: Digital Man to Psi-Jack on Mon Sep 29 2014 03:39 pm

    Re: How to get @-codes working in yesnobar?
    To answer your questions, no. I have the yesnobar.src/bin and
    noyesbar.src/bin in my mods directory, overriding that what's in exec,
    and I made sure after my changes to the code I re-compiled the src.

    It's just not translating the @-codes from the variables at all, and
    printing them as-is literally just like PRINTF is.

    The Baja PRINT function followed by a variable, will not expand @-codes either (for security reasons).

    Hmm, okay.. So is there an alternative way to handle this? Can yesnobar.js override the existance of yesnobar.bin (likewise for noyesbar...)?

    You had mentioned on IRC I would not need to make a yesnobar stub to load a js, so I'm trying to figure out the appropriate work-around to get this working to my desired functionality.

    ---
    [Psi-Jack -//- Decker]
    þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com
  • From Digital Man@VERT to Psi-Jack on Wednesday, October 01, 2014 16:06:27
    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Wed Oct 01 2014 08:54 am

    Re: How to get @-codes working in yesnobar?
    By: Digital Man to Psi-Jack on Mon Sep 29 2014 03:39 pm

    Re: How to get @-codes working in yesnobar?
    To answer your questions, no. I have the yesnobar.src/bin and
    noyesbar.src/bin in my mods directory, overriding that what's in exec,
    and I made sure after my changes to the code I re-compiled the src.

    It's just not translating the @-codes from the variables at all, and
    printing them as-is literally just like PRINTF is.

    The Baja PRINT function followed by a variable, will not expand
    @-codes either (for security reasons).

    Hmm, okay.. So is there an alternative way to handle this? Can yesnobar.js override the existance of yesnobar.bin (likewise for noyesbar...)?

    Yes.

    You had mentioned on IRC I would not need to make a yesnobar stub to load a js, so I'm trying to figure out the appropriate work-around to get this working to my desired functionality.

    First, you have to understand that @-codes are a potential security problem (e.g. @type: ../data/user.dat@). So, it may prove to be
    a bad idea to enable @-code expansion in yes/no prompts anyway, since some times the strings being passed into arguments to the
    question are user-supplied strings. Using the JS console object or Baja print statements to perform your cursor positioning is a
    better solution than depending on @-codes from the text.dat.

    Second, if you have yesnobar.js, it'll execute instead of yesnobar.bin.

    digital man

    Synchronet "Real Fact" #81:
    Flapuebarg unf vagreany ebg13 fhccbeg sbe fhcresvpvnyyl rapelcgvat grkg.
    Norco, CA WX: 83.1øF, 45.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mro@VERT/BBSESINF to Psi-Jack on Thursday, October 02, 2014 00:47:30
    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Wed Oct 01 2014 08:54 am


    Hmm, okay.. So is there an alternative way to handle this? Can yesnobar.js override the existance of yesnobar.bin (likewise for noyesbar...)?


    not sure but did you try it? cause you could just give it a try and know right then.

    i'm not sure if anybody replaced their yesnobar with .js scripts, but tracker might have.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Psi-Jack@VERT/DECKHVN2 to Digital Man on Thursday, October 02, 2014 08:16:47
    Re: How to get @-codes working in yesnobar?
    By: Digital Man to Psi-Jack on Wed Oct 01 2014 04:06 pm

    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Wed Oct 01 2014 08:54 am

    First, you have to understand that @-codes are a potential security problem (e.g. @type: ../data/user.dat@). So, it may prove to be a bad
    idea to enable @-code expansion in yes/no prompts anyway, since some
    times the strings being passed into arguments to the question are user-supplied strings. Using the JS console object or Baja print statements to perform your cursor positioning is a better solution than depending on @-codes from the text.dat.

    Interesting. I hadn't actually thought of that, but I also don't have anywhere that /I/ know of that actually does take user input and passes it on to a yes/no question directly as-is.

    Do you have any examples of where Synchronet may be passing user-provided questions to yesnobar/noyesbar, based on current stock CVS core code?

    Second, if you have yesnobar.js, it'll execute instead of yesnobar.bin.

    Awesome. Guess I'll just have to see about how to make it then. If I have any questions on that, I'll post to the appropriate forum for it. :)

    Thanks, DM.

    ---
    [Psi-Jack -//- Decker]
    þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com
  • From Digital Man@VERT to Psi-Jack on Thursday, October 02, 2014 23:29:48
    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Thu Oct 02 2014 08:16 am

    Re: How to get @-codes working in yesnobar?
    By: Digital Man to Psi-Jack on Wed Oct 01 2014 04:06 pm

    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Wed Oct 01 2014 08:54 am

    First, you have to understand that @-codes are a potential security problem (e.g. @type: ../data/user.dat@). So, it may prove to be a bad idea to enable @-code expansion in yes/no prompts anyway, since some times the strings being passed into arguments to the question are user-supplied strings. Using the JS console object or Baja print statements to perform your cursor positioning is a better solution
    than depending on @-codes from the text.dat.

    Interesting. I hadn't actually thought of that, but I also don't have anywhere that /I/ know of that actually does take user input and passes it on to a yes/no question directly as-is.

    Do you have any examples of where Synchronet may be passing user-provided questions to yesnobar/noyesbar, based on current stock CVS core code?

    The following text.dat entries take dynamic data as an argument and most or all
    of that data is user-supplied:

    "Delete mail from %s" 054 DeleteMailQ "\r\nDelete message #%u '%s'" 073 DeletePostQ
    "Delete %s" 092 DeleteTextFileQ "Upload '%s' to Sysop directory" 204 UploadToSysopDirQ "Upload '%s' to User directory" 205 UploadToUserDirQ "Upload '%s' to %s %s" 206 UploadToCurDirQ "Add %s to %s %s" 246 AddToOfflineDirQ "Chat with %s instead" 523 ChatWithGuruInsteadQ

    "\1_\1b\1hDo you mean %s #%u "\ 547 DoYouMeanThisUser
    Q
    "Convert 100k credits to %u minutes" 591 Convert100ktoNminQ "\r\nIt will cost you %u credits to send NetMail. "\ 618 NetMailCostContinueQ "\r\nDownload attached file: \1w%s\1b (%s bytes)" 662 DownloadAttachedFi
    leQ
    "Validate message #%u '%s'" 729 ValidatePostQ


    digital man

    Synchronet "Real Fact" #33:
    The back-up synchro.net nameserver and CVS repository is hosted by Deuce. Norco, CA WX: 81.1øF, 11.0% humidity, 8 mph WSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Mro@VERT/BBSESINF to Psi-Jack on Friday, October 03, 2014 02:13:04
    Re: How to get @-codes working in yesnobar?
    By: Psi-Jack to Digital Man on Thu Oct 02 2014 08:16 am

    Interesting. I hadn't actually thought of that, but I also don't have anywhere that /I/ know of that actually does take user input and passes it on to a yes/no question directly as-is.



    you may not know of it, but someone will find it. they can type out any file on your system and possibly gain access to your bbs system. there was an issue with this in regards to baja mods a few years back and DM modified synchronet to prevent these codes from being expanded.

    it was related to the method everyone was using to print strings.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::