tripleo,
@tripleo@fosstodon.org avatar

All you nutcases still using , what's actually wrong with it?

aka What are the sharp edges?

mjgardner, (edited )
@mjgardner@social.sdf.org avatar

@tripleo ’s “sharp edges” are mainly early syntax and features that later experience with large and networked found dangerous, but are preserved for backward (and we do mean “backward”) compatibility.

See the details of the strict and warnings pragmas, and successively missing items in feature bundles:

https://perldoc.perl.org/strict
https://perldoc.perl.org/warnings
https://perldoc.perl.org/feature#FEATURE-BUNDLES

And the summary of policies included in : https://MetaCPAN.org/pod/Perl::Critic::PolicySummary

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo I would also be remiss not to mention #Perl's included perltrap manual page, which notes both the strict and warnings pragmas and also has nice lists of things for those coming from other #programming languages and tools like #AWK, #C and #CPlusPlus, #JavaScript, #sed, and #shell.

https://perldoc.perl.org/perltrap

tripleo,
@tripleo@fosstodon.org avatar
mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo That link returns a “Not Found” page.

If you’re looking for documentation on 's bless function, you'll find it here: https://perldoc.perl.org/functions/bless

Most people are better served with an OO system rather than raw bless calls in Perl. See https://perldoc.perl.org/perlootut#PERL-OO-SYSTEMS for a discussion.

You can also investigate the currently experimental class feature that brings native OOP keywords to Perl: https://perldoc.perl.org/perlclass

Or do you have a different question?

tripleo,
@tripleo@fosstodon.org avatar

@mjgardner

You are very sharp, thx

tripleo,
@tripleo@fosstodon.org avatar

@mjgardner

Ok, I just read it, and the actual question is what is the function (keyword) that takes unsanitized input and lets the interpreter know that it's ok to trust it?

(very sharp again)

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo You’re thinking of #Perl’s “taint mode” (stop your teenage giggling), where outside data is untrusted unless it’s the extracted subpattern match in a #RegularExpression.

It’s only enabled under certain conditions. Read about it in the perlsec manual page: https://perldoc.perl.org/perlsec#Taint-mode

#programming #security #InfoSec #CyberSecurity #RegEx #RegExp

tripleo,
@tripleo@fosstodon.org avatar

@mjgardner

is there not one for web inputs?

it was 20 years ago, i dont remember.

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo You could use 's taint mode for web inputs, but that’s a big performance-reducing hammer affecting everything outside your program: command line arguments, environment variables, locale, file input, certain system calls, etc.. It also breaks many modules, including popular web application frameworks.

There's no one-size-fits-all solution, so use whatever’s appropriate for your web input. Start with @owasp’s Top 10: https://OWASP.org/www-project-top-ten/

tripleo,
@tripleo@fosstodon.org avatar

@mjgardner @owasp

it was 25 years ago, im just trying to remember. it was a perl feature specifically, before the popularity of python (and struts, etc, honestly)

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo Like I said in https://social.sdf.org/@mjgardner/112476483573909633, the only feature built in to for untrusted data is taint mode.

You might have heard of it or used it 25 years ago with simple scripts (and that still works!) but as I said in https://social.sdf.org/@mjgardner/112481166820565063, it breaks a lot of modern code.

It’s also no silver bullet: a taint failure is a fatal exception and it’s up to the developer to handle that gracefully.

leonerd,
@leonerd@fosstodon.org avatar

@tripleo If you want decent integration with 3rd party stuff (google APIs, amazon, etc...) you may need to write your own client stuff as most big service providers seem to have forgotten that exists

gisgeek,
@gisgeek@floss.social avatar

@leonerd @tripleo I can only confirm this, even if currently FFI support does allow to bind to C/C++ quite easily. I find the general situation much better of other seasoned languages such as or , instead.

mjgardner,
@mjgardner@social.sdf.org avatar

@gisgeek I’m a little confused: are you saying that and are better than or worse regarding third-party / integrations?

/ @leonerd @tripleo

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo BTW, I’m quite chuffed you’re taking an interest in . Enjoy the ride!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • megavids
  • lostlight
  • All magazines