[Psi-Jack -//- Decker]
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]
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.
þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com[Psi-Jack -//- Decker]
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.
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.
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?
þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com[Psi-Jack -//- Decker]
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.
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).
þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com[Psi-Jack -//- Decker]
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.
Hmm, okay.. So is there an alternative way to handle this? Can yesnobar.js override the existance of yesnobar.bin (likewise for noyesbar...)?
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.
Second, if you have yesnobar.js, it'll execute instead of yesnobar.bin.
þ Synchronet þ Decker's Heaven -//- bbs.deckersheaven.com[Psi-Jack -//- Decker]
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?
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.
Sysop: | MCMLXXIX |
---|---|
Location: | Prospect, CT |
Users: | 333 |
Nodes: | 10 (0 / 10) |
Uptime: | 145:44:22 |
Calls: | 581 |
Messages: | 237916 |