lucasnetau
Repos
63
Followers
4
Following
1

PHP Event Correlator

1
2

PHP JSON-RPC Helpers

1
0

Plugin for kevinchappell/formBuilder to render media (image/video/audit) on forms

This is an in-browser client only implementation of the American 75-number version of Bingo.

0
1

DNS over HTTPS executor for ReactPHP/dns

5
0

Events

Error occurred in checkbox-group with Others

@RASCAL-FG , I've added a PR to address this issue. Feel free to try it out in the meantime.

Created at 22 hours ago
pull request opened
Fix Uncaught TypeError when using "other" option in radio and checkbox-group

There is no checkbox setting for marking "other" as default selected skip it when synchronising the selected options.

Fixes #1320

Created at 4 days ago
create branch
lucasnetau create branch fix-for-1320
Created at 4 days ago
pull request opened
Online demo fix for loading formBuilder when window.SessionStorage is unavailable

formBuilder uses window.sessionStorage directly with no error handling when storage is unavailable. This is seen when loading the https://formbuilder.online/ demos in Chrome, preventing them from rendering

Uncaught (in promise) DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. at v.orderFields (https://formbuilder.online/assets/js/form-builder.min.js:19:105681) at v.appendControls (https://formbuilder.online/assets/js/form-builder.min.js:19:106250) at v.init (https://formbuilder.online/assets/js/form-builder.min.js:19:104435) at new v (https://formbuilder.online/assets/js/form-builder.min.js:19:104395) at new I (https://formbuilder.online/assets/js/form-builder.min.js:19:108218) at HTMLDivElement. (https://formbuilder.online/assets/js/form-builder.min.js:19:142653) at Function.each (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:2882) at n.fn.init.each (https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js:2:847) at https://formbuilder.online/assets/js/form-builder.min.js:19:142636

Use npm package storage-available to ensure we can read/write to window.SessionStorage before we access it, preventing uncaught Exception DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document

Created at 6 days ago
create branch
lucasnetau create branch storage
Created at 6 days ago
Fix CSP violation by removing node.js global polyfill from webpack generated files

@kevinchappell can you please make a new release with this patch and the already applied getFormData regression?

Created at 6 days ago
delete branch
lucasnetau delete branch unsafe-eval
Created at 6 days ago
pull request opened
Fix CSP violation by removing node.js global polyfill from webpack generated files

Fixes #1300

The node.js global polyfill included by webpack uses the unsafe new Function() triggering a Content Security Policy violation 'Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script' on secure installations that don't allow unsave-eval

This PR is the bare minimum removing the global polyfill. With some simple testing it does appear that all node polyfills can be excluded (node: false) however I'll leave that up to @kevinchappell to decide

Created at 6 days ago
create branch
lucasnetau create branch unsafe-eval
Created at 6 days ago
Content Security Policy and formbuilder

Got a similar error, seems to load in a lang file.

I uglified the min file. I think you see which part of the code is trigger the CSP block.

@jorgeuos You either need to allow this in your CSP to load the language file, or download the required language file and deploy it as part of your applications assets.

You can configure which lang file to use via the

i18n: {
    locale: 'en-US',
    location: "/path/to/lang/files"
}```


                                
Created at 6 days ago
Content Security Policy and formbuilder

@kevinchappell , The eval is injected by webpack 4.4 node.js global polyfill https://github.com/webpack/webpack/blob/webpack-4/buildin/global.js

new Function("return this")()

the simplest method to fix this is to disable injection of the polyfill in the webpack config

node: { global: false, }

I'll submit a PR

Created at 6 days ago
delete branch
lucasnetau delete branch wrap
Created at 1 week ago
issue comment
Silent error when first argument is jQuery object

@jcubic sure I'll make one. I'll also add some documentation around if a single instance is created it will always be returned as an object even if it was provided in a single element array.

Single Instance initialised => tagger() returns object Multiple instances initialised => tagger() returns object[]

Created at 1 week ago

Use overflow-y: auto instead of scroll to only show scroll bar when required

Created at 1 week ago
issue comment
Fix wrapping and whitespace

An idea of the two modes, overflow-y scroll in the second example and wrap in the third

Created at 2 weeks ago
Tracking ticket for IPv6 validation in SSL Certificates

PHP does not validate IPv6 addresses in the peers SubjectAltNames list https://github.com/php/php-src/issues/9356.

A workaround is contained in the library where we do the validation manually and then use the certificates fingerprint for validation in subsequent connections. This can lead to flaky connections for example with Google DoH who appear to use multiple certificates for their DoH server which have different fingerprints. CloudFlare appears to use only the one certificate.

Created at 2 weeks ago

Update description field in composer.json

Created at 2 weeks ago
Created at 2 weeks ago
Created at 2 weeks ago
lucasnetau create tag v1.0.0
Created at 2 weeks ago

Switch around $method and $loop in the DohExecutor constructor, $method is more likely to be set than $loop

Add in usage examples

  • Simple HTTPS client
  • Lookup client IP via DoH
Created at 2 weeks ago
issue comment
Silent error when first argument is jQuery object

This also occurs if you initialise using document.querySelectorAll which will return a NodeList even if only a single element exists.

Adding this to the top of the function tagger(input, options) will flatten the array if it contains only one element, works for both $() and document.querySelectorAll()

if (input.length && input.length === 1) {
    input = Array.from(input).pop();
}
Created at 2 weeks ago