Wire up live <mysql> for vst/modular1/modular1_patches, without <database>
<database> was SESSIONCTL.tag's own JET-1.4-only concept - the new JetCore port never implemented it. The real, dispatched tag for opening a MySQL connection is <mysql> (confirmed in Tag.cpp's dispatch chain), so these 3 product pages - the ones deferred in the previous conversion pass because they pull live rows via <sql> - now wrap their content in a real <mysql host="localhost" database="barant" user="barant" password="..."> matching barant.com's own config.cfg, with <retain> (a SESSIONCTL-only form-echo helper with no analog here) stripped. host="localhost" is correct per config.cfg but only reachable from barant.com itself - a locally-run .jtc genuinely cannot connect from here. That's intentional: the connection fails at runtime exactly as if the database were down, and APIServer's existing catch(coreutils::Exception) path (ApiSession.cpp) already turns that into a clean 500 rather than a crash - verified live: all 3 pages return HTTP 500 with mysql's own "database and host parameters are not valid." message, and the server process stays up and responsive throughout. The real DB password is deliberately not a literal in this file - it's read from BARANT_DB_PASSWORD at conversion time, and the resulting .jet output for these 3 pages is gitignored rather than committed, so the credential never enters git history even though it does end up baked into the locally-generated, locally-deployed .jtc.
This commit is contained in:
1 parent
fde94acad6
commit
942d2641ab
4 files changed
+230
No files matched your search
@@ -27,3 +27,11 @@ jetc/*.compiled.cpp
|
||||
jetc/*.pic.o
|
||||
jetc/*.jtc
|
||||
jetc/libCoreUtils_pic.a
|
||||
|
||||
# These 3 pages' converted output bakes in a real barant.com DB password
|
||||
# (via BARANT_DB_PASSWORD at conversion time - see convert.py's MYSQL_PAGES
|
||||
# handling) so they never enter git history, unlike the rest of
|
||||
# jetc/barant-site/jet/, which is plain static content and safe to commit.
|
||||
jetc/barant-site/jet/vst.jet
|
||||
jetc/barant-site/jet/modular1.jet
|
||||
jetc/barant-site/jet/modular1_patches.jet
|
||||
@@ -0,0 +1,95 @@
|
||||
<script>window.history.replaceState('','','/download.png');</script> <!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> <head>
|
||||
<title>Page Not Found</title>
|
||||
<META NAME=AUTHOR CONTENT=""> <META NAME=DESCRIPTION CONTENT=""> <META NAME=KEYWORDS CONTENT=""> <link rel="stylesheet" href="/css/main.css">
|
||||
<link rel="stylesheet" href="/css/control.css">
|
||||
<link rel="icon" type="image/png" href="https://barant.com/images/favicon.png">
|
||||
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T2WYRP0C0H"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-T2WYRP0C0H');
|
||||
</script>
|
||||
</head> <body > <form method="post" enctype="multipart/form-data"> <INPUT TYPE=HIDDEN NAME="_LASTPAGE" VALUE="download.png" > <INPUT TYPE=HIDDEN NAME="PROCESS" VALUE="" > <INPUT TYPE=HIDDEN NAME="EXITPROCESS" VALUE="" > <input type="hidden" name="DIR" value=""> <input type="hidden" name="_CTLDIR" value=""> <INPUT TYPE=HIDDEN NAME="PAGE" VALUE="download.png" > <INPUT TYPE=HIDDEN NAME="_TIMESTAMP" VALUE="" >
|
||||
<div class="pageclass">
|
||||
<div class="heading">
|
||||
<div style="display: inline-block; width: 500px;">
|
||||
<a href="https://barant.com"><img style="width: 60px; height: 60px; margin: 10px;" align="left" src="/images/btglogo.png"></a>
|
||||
<div style="padding-top: 15px;">
|
||||
<div style="left: 80px; color: #2099f0; font-size: 20pt;">BARANT TECHNOLOGY GROUP</div>
|
||||
<div style="left: 80px; color: #2099f0;">Page Not Found</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right; text-align: right; margin-right: 10px; margin-top: 5px;"></div>
|
||||
</div>
|
||||
<div class="menubar">
|
||||
<table class="menubar" cellspacing="0" cellpadding="0" width: 100%">
|
||||
<tr>
|
||||
<td style="border-bottom: 1pt solid #bbb; width: 20px;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/main">HOME</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/services">SERVICES</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/hosting">HOSTING</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/documents">DOCUMENT MGMT</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/siptrunk">SIP TRUNKING</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/vst">VST</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/modular1">MODULAR1</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/modular1_patches">MODULAR1 PATCHES</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/synthedit">SYNTHEDIT</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/wordpress">WORDPRESS</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/opensource">OPEN SOURCE</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/contact">CONTACT</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='download.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/login">LOGIN</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td style="border-bottom: 1pt solid #bbb; width: 10px;"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="display: table-row; width: 100%;">
|
||||
<div style="display: table-cell; border:
|
||||
background-image: url('/images/grid.png') repeat-x repeat-y;">
|
||||
<div class="panel" style="width: 200px; display: table-cell; ">
|
||||
<div class="sectionframe"> <div class="sectionframeheading"><b>OPEN SOURCE PROJECTS</b> </div> <div class="sectionframecontents">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='barantmail'; document.forms[0].submit(); document.forms[0].target='';" >BARANTMAIL</A><br>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='jet'; document.forms[0].submit(); document.forms[0].target='';" >JET</A><br>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='synthmax'; document.forms[0].submit(); document.forms[0].target='';" >SYNTHMAX</A><br>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='serverframework'; document.forms[0].submit(); document.forms[0].target='';" >SERVER CORE FRAMEWORK</A>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='asm1802'; document.forms[0].submit(); document.forms[0].target='';" >ASM/MCH 1802 SIMULATOR</A><br>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="panel" style="display: table-cell; width: 960px; max-width: 960px;"><p>Requested page is not found.</p>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" style="clear: both;">© 1999-2026 BARANT Systems, All Rights Reserved</div>
|
||||
</div>
|
||||
</form> </body> </html>
|
||||
</if>
|
||||
</if>
|
||||
@@ -0,0 +1,95 @@
|
||||
<script>window.history.replaceState('','','/speaker.png');</script> <!DOCTYPE html> <!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]--> <!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]--> <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]--> <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]--> <head>
|
||||
<title>Page Not Found</title>
|
||||
<META NAME=AUTHOR CONTENT=""> <META NAME=DESCRIPTION CONTENT=""> <META NAME=KEYWORDS CONTENT=""> <link rel="stylesheet" href="/css/main.css">
|
||||
<link rel="stylesheet" href="/css/control.css">
|
||||
<link rel="icon" type="image/png" href="https://barant.com/images/favicon.png">
|
||||
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-T2WYRP0C0H"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-T2WYRP0C0H');
|
||||
</script>
|
||||
</head> <body > <form method="post" enctype="multipart/form-data"> <INPUT TYPE=HIDDEN NAME="_LASTPAGE" VALUE="speaker.png" > <INPUT TYPE=HIDDEN NAME="PROCESS" VALUE="" > <INPUT TYPE=HIDDEN NAME="EXITPROCESS" VALUE="" > <input type="hidden" name="DIR" value=""> <input type="hidden" name="_CTLDIR" value=""> <INPUT TYPE=HIDDEN NAME="PAGE" VALUE="speaker.png" > <INPUT TYPE=HIDDEN NAME="_TIMESTAMP" VALUE="" >
|
||||
<div class="pageclass">
|
||||
<div class="heading">
|
||||
<div style="display: inline-block; width: 500px;">
|
||||
<a href="https://barant.com"><img style="width: 60px; height: 60px; margin: 10px;" align="left" src="/images/btglogo.png"></a>
|
||||
<div style="padding-top: 15px;">
|
||||
<div style="left: 80px; color: #2099f0; font-size: 20pt;">BARANT TECHNOLOGY GROUP</div>
|
||||
<div style="left: 80px; color: #2099f0;">Page Not Found</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: right; text-align: right; margin-right: 10px; margin-top: 5px;"></div>
|
||||
</div>
|
||||
<div class="menubar">
|
||||
<table class="menubar" cellspacing="0" cellpadding="0" width: 100%">
|
||||
<tr>
|
||||
<td style="border-bottom: 1pt solid #bbb; width: 20px;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/main">HOME</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/services">SERVICES</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/hosting">HOSTING</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/documents">DOCUMENT MGMT</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/siptrunk">SIP TRUNKING</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/vst">VST</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/modular1">MODULAR1</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/modular1_patches">MODULAR1 PATCHES</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/synthedit">SYNTHEDIT</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/wordpress">WORDPRESS</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/opensource">OPEN SOURCE</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/contact">CONTACT</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td class="baritem">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='speaker.png'; document.forms[0].submit(); document.forms[0].target='';" ><a href="/login">LOGIN</a></A></td>
|
||||
<td style="border-bottom: 1pt solid #bbb;"> </td>
|
||||
<td style="border-bottom: 1pt solid #bbb; width: 10px;"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="display: table-row; width: 100%;">
|
||||
<div style="display: table-cell; border:
|
||||
background-image: url('/images/grid.png') repeat-x repeat-y;">
|
||||
<div class="panel" style="width: 200px; display: table-cell; ">
|
||||
<div class="sectionframe"> <div class="sectionframeheading"><b>OPEN SOURCE PROJECTS</b> </div> <div class="sectionframecontents">
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='barantmail'; document.forms[0].submit(); document.forms[0].target='';" >BARANTMAIL</A><br>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='jet'; document.forms[0].submit(); document.forms[0].target='';" >JET</A><br>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='synthmax'; document.forms[0].submit(); document.forms[0].target='';" >SYNTHMAX</A><br>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='serverframework'; document.forms[0].submit(); document.forms[0].target='';" >SERVER CORE FRAMEWORK</A>
|
||||
<A HREF="javascript: document.forms[0].PROCESS.value=''; document.forms[0].PAGE.value='asm1802'; document.forms[0].submit(); document.forms[0].target='';" >ASM/MCH 1802 SIMULATOR</A><br>
|
||||
</div></div>
|
||||
</div>
|
||||
<div class="panel" style="display: table-cell; width: 960px; max-width: 960px;"><p>Requested page is not found.</p>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" style="clear: both;">© 1999-2026 BARANT Systems, All Rights Reserved</div>
|
||||
</div>
|
||||
</form> </body> </html>
|
||||
</if>
|
||||
</if>
|
||||
@@ -113,6 +113,34 @@ def strip_setenv(html):
|
||||
return re.sub(r'<setenv\s+name="[^"]*">.*?</setenv>', '', html, flags=re.IGNORECASE | re.DOTALL)
|
||||
|
||||
|
||||
def strip_retain(html):
|
||||
"""<retain name="X"> is a SESSIONCTL.tag helper that echoes a posted form
|
||||
field back as a hidden input - meaningless with no <form>/session in this
|
||||
static conversion, and (since it isn't a tag jetc's fallback interpreter
|
||||
knows about) would otherwise render as literal untouched text rather
|
||||
than erroring, which is worse than just dropping it."""
|
||||
return re.sub(r'<retain\s+name="[^"]*"\s*>', '', html, flags=re.IGNORECASE)
|
||||
|
||||
|
||||
# Pages that need a live product-row lookup - <database> (SESSIONCTL-only,
|
||||
# not implemented by the new JetCore port) is replaced with the real
|
||||
# <mysql> tag it should have used all along. host="localhost" matches
|
||||
# barant.com's own config.cfg verbatim: MySQL is only reachable from the
|
||||
# server itself, so a locally-run .jtc genuinely can't connect here - by
|
||||
# design, per instruction, this fails at runtime exactly as if the
|
||||
# database were down, and APIServer's existing catch(coreutils::Exception)
|
||||
# path (ApiSession.cpp) already turns that into a clean 500, not a crash.
|
||||
#
|
||||
# The real credential is deliberately NOT a literal here - it's supplied
|
||||
# via the BARANT_DB_PASSWORD env var at conversion time, since the .jet
|
||||
# files this produces for these pages get gitignored rather than committed
|
||||
# (see .gitignore) precisely so the password never lands in git history.
|
||||
MYSQL_PAGES = {"vst", "modular1", "modular1_patches"}
|
||||
DB_PASSWORD = os.environ.get("BARANT_DB_PASSWORD", "")
|
||||
MYSQL_OPEN = '<mysql host="localhost" database="barant" user="barant" password="%s" sessionid="">' % DB_PASSWORD
|
||||
MYSQL_CLOSE = '</mysql>'
|
||||
|
||||
|
||||
def selfclose_set(html):
|
||||
"""Old JET shorthand allows <set name="x" value="y"> with no closing tag
|
||||
and no container - jetc's own real <set> codegen requires this to be
|
||||
@@ -209,11 +237,15 @@ def convert_page(name):
|
||||
contents = contents_m.group(1)
|
||||
|
||||
contents = strip_setenv(contents)
|
||||
contents = strip_retain(contents)
|
||||
contents = selfclose_set(contents)
|
||||
contents = flatten_sectionframes(contents)
|
||||
contents = flatten_linkbuttons(contents)
|
||||
contents = resolve_images(contents)
|
||||
|
||||
if name in MYSQL_PAGES:
|
||||
contents = MYSQL_OPEN + contents + MYSQL_CLOSE
|
||||
|
||||
if name == "jet":
|
||||
# jet.page dispatches on a $[ARGS] query-string sub-page selector
|
||||
# (?tags, ?set, etc. -> jet_<sub>.section) - that request-derived
|
||||
|
||||
Reference in new issue
Block a user