NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Jane

Pages: [1] 2 3
1
Web Server - Ask For Help / OT - Anyone working with NDJSON?
« on: December 26, 2023, 02:38:18 PM »
"Newline Delimited" JSON.

To be honest, I just came across this while looking through the specs for the FHIR data required for the US Federal Government's current UDS+ reporting requirements:
https://fhir.org/guides/hrsa/uds-plus/spec.html

A bunch of JSON stuff combined in a single file.
Can skip over/ignore any badly-formed JSON components.

https://github.com/ndjson/ndjson-spec

2
Web Server - Ask For Help / IP V6 bit me
« on: September 08, 2023, 03:23:42 PM »
This is, admittedly, an edge case that most people will probably not encounter.  But worth awareness...

Aside - Bruce, the NetWebClient in NetDemo has an IPV6 checkbox but it doesn't do anything.  For my testing I replaced it with radio buttons for Net:IPvAuto, Net:IPv4, Net:IPv6
I would suggest you modify the NetDemo app that way... it's useful for testing.
/Aside

I have various apps running on a Windows 2019 server in an Active Directory domain that is set up with only IPv4 DNS. 

The two apps involved in this problem are both ones I'm in the process of converting from NT12 to NT14.  One is an API server, the other has an API client.

After rebuilding, I set the server to serve IPv4.
I did not change the client. 
Its default behavior (Net:IPvAuto) did not work for me.

I guess that whatever is happening  takes place inside the NetTalk DLL, so I'm not sure how you're doing the auto. 
Your docs say: "By default, and if Family is set to Net:IPvAuto or Net:IPv4 then an IPv4 DNS Lookup will happen on this name first".

But what shot me in the foot (I did not shoot MYSELF in the foot!!) is apparently how Windows handles a lookup when it "knows" that the server in question is itself.
As you can see from the first pic, doing an NSLOOKUP (which uses the DNS server) resolves to an IPv4 address (which is all that our DNS handles).
But doing a PING of the same FULLY-QUALIFIED DNS ADDRESS returns a loopback IPv6 address.

I don't know if that is the cause...  but the net client compiled without specifying IP family refuses to connect to my API server.  If you were actually doing a DNS lookup I would have thought that "auto" would have figured out to use IPv4.  If you're doing a PING internally, it would have found the IPv6.

If I force the client to use IPv4, all is well in the world.  So at least in my edge case, "auto" is not bullet-proof.

More grey hairs...  sigh... 

Cheers,

Jane






3
Bruce,

Converting my first app to NT14 from 12.63.  Thanks for the walk-through on ClarionLive.

I set Challenge Method to Manual (hoping that's a handy new setting for not using Let's Encrypt for a website that has a manual cert.)

The radio button sets the value to -1
set:AcmeChallenge is a byte.
The serverSettings XML translates that -1 to 255.

Is this the intended behavior?  Should set:AcmeChallenge be a LONG?  (Since net:manual is declared as equate(-1) in NetAcme.inc I don't think it should be a BYTE).

Cheers,

Jane

4
Web Server - Ask For Help / Attacked by Let's Encrypt
« on: July 19, 2023, 03:17:49 PM »
At least I *think* it's ACME gone rogue.

I have an API/web server on an internal LAN.  It's been using a certificate from our local certificate authority that's trusted by Active Directory.

That certificate expires on August 19.

It appears that yesterday the ACME service helpfully decided that my certificate was too stale for its taste.  Couldn't get something from Let's Encrypt (since I'm on a LAN).  And decided to overwrite my still-good certificate with its own new rubbish certificate issued by sales@capesoft.com.
Well, it may be rubbish but at least it's good for a year!

Is there some way to pull the teeth on this?  I don't want to replace the legitimate cert until the beginning of August but don't want the server overwriting it each night.

TIA

Jane

5
Web Server - Ask For Help / 12.60 Header menu DIV mismatch
« on: May 22, 2023, 06:58:06 PM »
From the history:  "Fix: Better handling of blank parameters in SetDomains, CreateButton, _DivHeader, _DivFooter"

Is that what I'm seeing?  I now have the border-bottom for the header appearing below the browse or whatever's on the page. 
And on the index page, the default vertical height is gone.

Are there some "blank parameters" somewhere I've forgotten to set?
(Default for app is Div Grid).

Thanks!



6
Web Server - Ask For Help / NetLDAP bug in SetUser procedure
« on: May 05, 2023, 12:54:54 PM »
Bruce,

There's a bug in the NetLDAP.SetUser() procedure when the user name is of the format DOMAIN\Jane.Bean

SetUser is called multiple times by NetLdap.UserInGroup().

The first time through, it correctly strips off the domain and backslash and returns
sAMAccountName=Jane.Bean

After the first time, however, it hits the ELSE clause and adds a backslash.
This results in
sAMAccountName=\Jane.Bean

And the group lookup fails.

There's a comment on line 624 where the extraneous backslash is injected.
I don't know when the change was made to NetLDAP, but was testing something yesterday and discovered that this is broken.
That backslash needs to be not inserted.

NT 12.59.

jf

7
Web Server - Ask For Help / Any SAML wisdom out there?
« on: March 01, 2023, 04:01:07 PM »
Anybody integrated a SAML provider with NetTalk ?
Okta?  MS Azure AD? Others?

Any wisdom?  Any war stories?


8
Web Server - Ask For Help / Draw (Graph) crashes my web server
« on: February 09, 2023, 02:52:55 PM »
Subtitle - is there a way I'm missing to override Draw's drwGetTempPath? 

It's presently calling GetTempPathA.

I added a graph to a nettalk app, copying one of the examples.
Works fine on my development machine.

Works fine on server when running as a service or run asAdministrator.

Crashes on server when not running as a service when I run the graph procedure.  Error (shown in pic) says it's trying to create DrawStore.tmp in a folder that does not exist.

Yes, the app is mostly running as a service.  And then it runs fine (using the windows\temp folder).

Or I can manifest the app with a requireAdministrator manifest and it works running as an exe on the server.  But then I have to click through the UAC popup on my dev machine each time I compile and run.

It may just be that something is bolluxed on the server.  SET says "my" temp path ends with \6
But that folder doesn't exist.
The GUI says my user's temp path just ends with \temp.

But this all seems rather fragile.  It would be nice to have an option to tell Draw where to do its thing and not to encounter some servers where it can't make its temp folder work.

(Until, of course, NT 14's javascript graphs!)

Cheers,

Jane, writer of hyperbolic subject lines


9
Web Server - Ask For Help / Hiding password (etc) in web server log
« on: December 24, 2022, 06:56:40 PM »
Grinchly Greetings, Obi Wan!

I was interested in the solution you worked out for masking passwords in the web server log display during this week's webinar.

What you showed mostly works.   

BUT?  it still leaks passwords BEFORE they get to the AddLog section of code. 
As soon as you move around in the log and then come back to the POST, the value has been masked by the code you added in AddLog.  But initially it displays on the screen.

If there were an embed available in StartNewThread, before the ?web:LastPost is first displayed, that initial display of sensitive data could be avoided.

[Edited to add - would you add an embed before that DISPLAY statement ?  ]

Of course, that requires running the filtering code twice  :-\

Holiday Cheers,

Jane


10
Web Server - Ask For Help / My tip broke my menu
« on: December 06, 2022, 06:21:33 PM »
Bruce,

On a drop-down menu I put the following as a tool-tip:
Code: [Select]
'View items that need to be configured at the command-line or in the web server app window.'
Seemed innocuous, but it wound up breaking the entire menu.

Took a bit of head scratching to discover that the tip gets concatenated with the button class and it all has to fit into 256 characters.

Would you considering making those strings larger?

Thanks,

Jane

11
Web Server - Ask For Help / Script defer
« on: October 23, 2022, 04:08:46 PM »
Bruce,

I ran into a minor head-scratcher updating an app from 11.47 to 12.47.

This is a "hybrid" app. 
Much of it is pure NetTalk.  But for reasons of imposed aesthetic choices, it has a section that displays pages formatted with Bootstrap.  (They are patient status display pages on large monitors on the wall in various clinics.  The status is updated every 15 seconds.   A URL parameter hard-coded into the dedicated ChromeBox at each site tells the server which site's patients to display.)  This was originally built in NT 10 and has been on NT 11 for the past couple of years.

Those pages are a NetWebPage "shell" that contains a framework of scripts and CSS and a named division.
One script is on a timer to update that named division by making a call to another NetWebPage every 15 seconds.
The scripts in the "shell" page are jquery and bootstrap (from the /scripts folder) and several scripts hard-coded in the NetWebPage.  The latter are in the page rather than in a file because they include variables based on the URL sent to the page.

Then kaboom when I rebuilt with 12.47.
The reason turns out to be that you've added "defer" to NetWebServerWorkerBase.AddScript

That "defer" in the jquery loading then caused my locally-built scripts to throw an error - Uncaught ReferenceError: $ is not defined

What do you mean it isn't defined?? I just defined it!!!  (Well, yeah.)

Anyway, now that I'm aware of the issue I've fixed my code in that one NetWebPage and all is well.

But I was wondering whether there would be any value in having an optional parameter to override that "defer" in NetWebServerWorkerBase.AddScript (or an overload version)?

Interestingly, looking at the NT history it says "Add: DEFER attribute added to all <script> sections. " for version 4.31(beta)
And then again "Add: defer attribute to script files" for 12.09.

BTW - you generate
Code: [Select]
defer="defer"
The Mozilla docs say defer is Boolean.  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer

My own experiment finds that just the presence of the single word defer triggers the behavior. 

As that Mozilla link says,
Quote
inline scripts without the type="module" attribute, are fetched and executed immediately,
  So I need to un-defer the jquery rather than defer my inline scripts.

And that's how I spent my Sunday ;)

Cheers,

Jane

12
Web Server - Ask For Help / What is more?
« on: October 17, 2022, 07:33:38 PM »
Hi, Bruce.

In a browse, for a string field there's an option on the Column tab called "Abbreviate Length".

It adds "more" as a hyperlink.  In the template-generated code, what's generated when I specify a picture of @s70 and an "abbreviate length" of 50 is:

Code: [Select]
packet.append( p_web.CreateHyperLink(p_web._jsok(Left(p_web.FormatValue(aud:notes,'@s70')),(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0)),,,,loc:javascript,,,(Net:HtmlOk*0)+(Net:UnsafeHtmlOk*0),,,'editAuditDatesBrowse',loc:abbreviate,'more'))

where editAuditDatesBrowse is the name of the browse procedure.

I haven't managed to find anything in the docs.  There is a mention in the May 3, 2018 user group webinar.  But when you ran an example for Don it didn't seem to work.

Does this actually work?  What is it supposed to do when one clicks the link?  If I'm reading netweb.clw correctly, it looks as if the second parameter should be the URL??

Thanks.

Jane


13
Web Server - Ask For Help / Display field using file tag?
« on: October 11, 2022, 05:14:46 PM »
Question (12.46)

NetWebForm template.
Creating a Display field.
On the Display tab, there's a droplist at the top cunningly called Display.
One of the options in the list is "File Tag <!--Net:f"

If I choose that and put into the Text field:
'<!-- Net:f:/staticText/textNewAudit1.htm -->'

it goes through NetWebServerWorkerBase.LoadTagFile and looks for a file with that name.  And none of my files are named Net:f:whatever.

If instead I enter:
'/staticText/textNewAudit1.htm'
it works fine.

As does:
'staticText\textNewAudit1.htm'

Is this the expected behavior?  I just found the "File Tag <!--Net:f" placeholder confusing.

Cheers,

Jane

14
Web Server - Ask For Help / Net Service Method XML code problem.
« on: September 27, 2022, 04:32:33 PM »
I think some template is getting confused.

Fresh install of NT 12.46.
Example Web77.

With XFiles 4.03/Reflection 1.13 it WILL compile.

Run corresponding client app.
Date method rest(get) works for receive format xml and json.

dbCustomer method REST get works for json. Make same request for xml and the server throws an exception -
xfiles.clw:2603 - XFILESSTREAM.EXTRACTNAMESFORSAVE is second item down on the call stack.

dbCustomers method throws same exception.

Through web browser interface, going to documentation page (http://127.0.0.1:88/Database?dbCustomer) shows "Error in site JavaScript" in browser and same exception on server.

Update XFiles to 4.04.  Refresh classes.
Now web77 will NOT compile (complains about the removed DONTREPLACECOLONS property). The only way I was able to get it to compile was to remove XML as a return type for each service.  Is there something I need to update to make the example work?

Jane

15
Web Server - Ask For Help / SecWin example app with Active Directory
« on: August 20, 2022, 06:04:21 PM »
Hi, Bruce,

As mentioned in my earlier email today, I?m just dipping my toe into SecWin. I?m using the web88 example (since I couldn?t get the other SecWin example web51 to compile.)

I?m able to do local user logins with this example.  But when I switch the login type for the company to Active Directory, it doesn?t work.

I put a trace statement in the ActiveDirectory_ValidateUser procedure and that never gets called.

In secwin.clw the code runs through SecwinLoginWebClass.StartLoginType, hits the CASE of sw:ActiveDirectoryLoginUserPassword condition, and from that calls to SecwinLoginWebClass.ShowLoginAndPasswordTab. 
But that SecwinLoginWebClass.ShowLoginAndPasswordTab method is empty. 
Is it overridden somewhere?  What should be calling the ActiveDirectory_ValidateUser procedure?

I think I'm probably missing something basic.

??

Jane


Pages: [1] 2 3