Re: subcomponents
Hiram Gibbard <[email protected]> Mon, 9 Jan 2017 15:25:42 -0600
| Newsgroups | gmane.comp.web.mason.user |
|---|---|
| Message-ID | <CAGTmFdGAjHHKpiPKKBuRoG-VGJCv3GXzMyJFkRQ_KU-HOzTCYQ@mail.gmail.com> |
--===============3245660242478439515== Content-Type: multipart/alternative; boundary=001a114a97c68efcf20545b00277 --001a114a97c68efcf20545b00277 Content-Type: text/plain; charset=UTF-8 i do have the <%def .is_valid_sshkey> defined, but where is the code embedded? I also executed a recursive/case insensitive search in all the application code files for "is_valid_sshkey" and nothing was returned outside of what I've already seen. is the logic for is_valid_sshkey built on the fly, if so, where is it getting the sub-component set of rules? basically this application was written awhile ago and i'm trying to figure out how it validates the ssh keys provided in the text field by the user. It works on the old server, yet not the new one. I migrated the app to the new one from the old one by taring up the entire directory and deploying it on the new server. I'm searching, using grep and find, for "is_valid_sshkey" on both the old and new servers and can not seem to find any mention of "is_valid_sshkey other than whats defined for the sub-component and %def. Magic? On Mon, Jan 9, 2017 at 3:14 PM, William Cox <[email protected]> wrote: > Hiram, > > you likely are dealing with a call to an embedded component: > https://metacpan.org/pod/distribution/HTML-Mason/lib/ > HTML/Mason/Devel.pod#EMBEDDED-COMPONENTS > > the ".is_valid_sshkey" should be found as <%def > .is_valid_subkey>...<%/def> within the same file > > On Mon, Jan 9, 2017 at 4:10 PM Seb <[email protected]> wrote: > >> >> Hi, >> >> >> > thanks for that Seb, but what if I'm not finding a file called >> > .is_valid_sshkey? >> > >> > using: >> > sudo find / -type f -iname ".is_valid_sshkey" -ls >> >> There could be a suffix, such as .mas, which would not be found with your >> syntax. Example: >> >> >mkdir toto >> >touch toto/.hidden >> >find . -type f -iname ".hidden" -ls >> 217773 0 -rw-r--r-- 1 seb seb 0 Jan 9 22:04 ./toto/.hidden >> >find . -type f -iname ".hid" -ls >> >find . -type f -iname ".hid*" -ls >> 217773 0 -rw-r--r-- 1 seb seb 0 Jan 9 22:04 ./toto/.hidden >> >> So I suggest you try this: >> >> sudo find / -type f -iname ".is_valid_sshkey*" -ls >> >> >> Seb. >> >> >> >> > >> > On Mon, Jan 9, 2017 at 2:47 PM, Seb <[email protected]> wrote: >> > >> >> >> >> Hi Hiram, >> >> >> >> >> >> my $is_valid = $m->comp(".is_valid_sshkey", sshkey => $ssh2, uidnumber >> => >> >>> $employeeNumber, ); >> >>> >> >>> As I understand it, this is a mason subcomponent, but what isn't >> clear to >> >>> me is the ".is_valid_sshkey" >> >>> >> >> >> >> The line means to use a Mason component whose code resides in the file >> >> named ".is_valid_sshkey", which could also be written >> ./.is_valid_sshkey . >> >> You will find this (hidden) file in the same directory as the one from >> >> which the code is extracted. >> >> >> >> >> >> Seb. >> >> >> > >> > >> > >> > >> >> ------------------------------------------------------------ >> ------------------ >> Developer Access Program for Intel Xeon Phi Processors >> Access to Intel Xeon Phi processor-based developer platforms. >> With one year of Intel Parallel Studio XE. >> Training and support from Colfax. >> Order your platform today. http://sdm.link/xeonphi >> _______________________________________________ >> Mason-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mason-users >> > -- > William Cox > > e: [email protected] > > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS d- s+:+() a C++(++++)$ UBLC(++)$ > P+++(++++)$ L++(+++)$ !E--- W++(+++)$ > !N !o? K--? !w--- !O M++ !V- PS-(--)@ PE+() > Y+ !PGP t++ !5 X+++ !R tv(+) b+>++ > DI+(++) D+() G e h--- r+++ y+++>++++ > ------END GEEK CODE BLOCK------ > -- Hiram Gibbard [email protected] http://hiramgibbard.com --001a114a97c68efcf20545b00277 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">i do have the <%def .is_valid_sshkey> defined, but w= here is the code embedded?=C2=A0<div><br></div><div>I also executed a recur= sive/case insensitive search in all the application code files for "is= _valid_sshkey" and nothing was returned outside of what I've alrea= dy seen.</div><div><br></div><div>is the logic for is_valid_sshkey built on= the fly, if so, where is it getting the sub-component set of rules?</div><= div><br></div><div>basically this application was written awhile ago and i&= #39;m trying to figure out how it validates the ssh keys provided in the te= xt field by the user.=C2=A0</div><div><br></div><div>It works on the old se= rver, yet not the new one. I migrated the app to the new one from the old o= ne by taring up the entire directory and deploying it on the new server.=C2= =A0</div><div><br></div><div>I'm searching, using grep and find, for &q= uot;is_valid_sshkey" on both the old and new servers and can not seem = to find any mention of "is_valid_sshkey other than whats defined for t= he sub-component and %def.</div><div><br></div><div>Magic?=C2=A0</div></div= ><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Mon, Jan 9, 2= 017 at 3:14 PM, William Cox <span dir=3D"ltr"><<a href=3D"mailto:mydimen= [email protected]" target=3D"_blank">[email protected]</a>></span> wrot= e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l= eft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>Hiram,<br><= br></div>you likely are dealing with a call to an embedded component: <a hr= ef=3D"https://metacpan.org/pod/distribution/HTML-Mason/lib/HTML/Mason/Devel= .pod#EMBEDDED-COMPONENTS" target=3D"_blank">https://metacpan.org/pod/<wbr>d= istribution/HTML-Mason/lib/<wbr>HTML/Mason/Devel.pod#EMBEDDED-<wbr>COMPONEN= TS</a><br><br></div>the ".is_valid_sshkey" should be found as <= ;%def .is_valid_subkey>...<%/def> within the same file<br></div><b= r><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Jan 9, 2017 at 4:10 P= M Seb <<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>>= ; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .= 8ex;border-left:1px #ccc solid;padding-left:1ex"><br class=3D"m_15626875315= 59746731gmail_msg"> Hi,<br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> > thanks for that Seb, but what if I'm not finding a file called<br = class=3D"m_1562687531559746731gmail_msg"> > .is_valid_sshkey?<br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> > using:<br class=3D"m_1562687531559746731gmail_msg"> > sudo find / -type f -iname ".is_valid_sshkey" -ls<br class= =3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> There could be a suffix, such as .mas, which would not be found with your<b= r class=3D"m_1562687531559746731gmail_msg"> syntax. Example:<br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> >mkdir toto<br class=3D"m_1562687531559746731gmail_msg"> >touch toto/.hidden<br class=3D"m_1562687531559746731gmail_msg"> >find . -type f -iname ".hidden" -ls<br class=3D"m_15626875315= 59746731gmail_msg"> 217773=C2=A0 =C2=A0 0 -rw-r--r--=C2=A0 =C2=A01 seb=C2=A0 =C2=A0 =C2=A0 seb= =C2=A0 =C2=A00 Jan=C2=A0 9 22:04 ./toto/.hidden<br class=3D"m_1562687531559= 746731gmail_msg"> >find . -type f -iname ".hid" -ls<br class=3D"m_15626875315597= 46731gmail_msg"> >find . -type f -iname ".hid*" -ls<br class=3D"m_1562687531559= 746731gmail_msg"> 217773=C2=A0 =C2=A0 0 -rw-r--r--=C2=A0 =C2=A01 seb=C2=A0 =C2=A0 =C2=A0 seb= =C2=A0 =C2=A00 Jan=C2=A0 9 22:04 ./toto/.hidden<br class=3D"m_1562687531559= 746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> So I suggest you try this:<br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> sudo find / -type f -iname ".is_valid_sshkey*" -ls<br class=3D"m_= 1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> Seb.<br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> > On Mon, Jan 9, 2017 at 2:47 PM, Seb <<a href=3D"mailto:[email protected]" = class=3D"m_1562687531559746731gmail_msg" target=3D"_blank">[email protected]</a>&g= t; wrote:<br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> >> Hi Hiram,<br class=3D"m_1562687531559746731gmail_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> >> my $is_valid =3D $m->comp(".is_valid_sshkey", sshkey = =3D> $ssh2, uidnumber =3D><br class=3D"m_1562687531559746731gmail_msg= "> >>> $employeeNumber, );<br class=3D"m_1562687531559746731gmail_msg= "> >>><br class=3D"m_1562687531559746731gmail_msg"> >>> As I understand it, this is a mason subcomponent, but what isn= 't clear to<br class=3D"m_1562687531559746731gmail_msg"> >>> me is the ".is_valid_sshkey"<br class=3D"m_156268753= 1559746731gmail_msg"> >>><br class=3D"m_1562687531559746731gmail_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> >> The line means to use a Mason component whose code resides in the = file<br class=3D"m_1562687531559746731gmail_msg"> >> named ".is_valid_sshkey", which could also be written ./= .is_valid_sshkey .<br class=3D"m_1562687531559746731gmail_msg"> >> You will find this (hidden) file in the same directory as the one = from<br class=3D"m_1562687531559746731gmail_msg"> >> which the code is extracted.<br class=3D"m_1562687531559746731gmai= l_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> >> Seb.<br class=3D"m_1562687531559746731gmail_msg"> >><br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> ><br class=3D"m_1562687531559746731gmail_msg"> <br class=3D"m_1562687531559746731gmail_msg"> ------------------------------<wbr>------------------------------<wbr>-----= -------------<br class=3D"m_1562687531559746731gmail_msg"> Developer Access Program for Intel Xeon Phi Processors<br class=3D"m_156268= 7531559746731gmail_msg"> Access to Intel Xeon Phi processor-based developer platforms.<br class=3D"m= _1562687531559746731gmail_msg"> With one year of Intel Parallel Studio XE.<br class=3D"m_156268753155974673= 1gmail_msg"> Training and support from Colfax.<br class=3D"m_1562687531559746731gmail_ms= g"> Order your platform today. <a href=3D"http://sdm.link/xeonphi" rel=3D"noref= errer" class=3D"m_1562687531559746731gmail_msg" target=3D"_blank">http://sd= m.link/xeonphi</a><br class=3D"m_1562687531559746731gmail_msg"> ______________________________<wbr>_________________<br class=3D"m_15626875= 31559746731gmail_msg"> Mason-users mailing list<br class=3D"m_1562687531559746731gmail_msg"> <a href=3D"mailto:[email protected]" class=3D"m_15626875315= 59746731gmail_msg" target=3D"_blank">[email protected].<wbr>net= </a><br class=3D"m_1562687531559746731gmail_msg"> <a href=3D"https://lists.sourceforge.net/lists/listinfo/mason-users" rel=3D= "noreferrer" class=3D"m_1562687531559746731gmail_msg" target=3D"_blank">htt= ps://lists.sourceforge.net/<wbr>lists/listinfo/mason-users</a><br class=3D"= m_1562687531559746731gmail_msg"> </blockquote></div><div dir=3D"ltr">-- <br></div><div data-smartmail=3D"gma= il_signature"><div dir=3D"ltr">William Cox<br><br>e: <a href=3D"mailto:mydi= [email protected]" target=3D"_blank">[email protected]</a><br><br>-----= BEGIN GEEK CODE BLOCK-----<br>Version: 3.1<br>GCS d- s+:+() a C++(++++)$ UB= LC(++)$<br>P+++(++++)$ L++(+++)$ !E--- W++(+++)$<br>!N !o? K--? !w--- !O M+= + !V- PS-(--)@ PE+()<br>Y+ !PGP t++ !5 X+++ !R tv(+) b+>++<br>DI+(++) D+= () G e h--- r+++ y+++>++++<br>------END GEEK CODE BLOCK------<br></div><= /div> </blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class= =3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><d= iv>Hiram Gibbard<br><a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a></div><div><a href=3D"http://hiramgibbard.com" targe= t=3D"_blank">http://hiramgibbard.com</a></div><div><br><div style=3D"displa= y:inline"></div></div></div></div> </div> --001a114a97c68efcf20545b00277-- --===============3245660242478439515== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi --===============3245660242478439515== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Mason-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mason-users --===============3245660242478439515==--