[-] Rick_C137@programming.dev 1 points 2 days ago* (last edited 2 days ago)

I wanted to have a default server that catch ~wrong DNS query to the server

Solution

I don't know how to link to my previous lemmy post, so here it is again

server {
    listen 443 ssl;
    server_name _;
    ssl_certificate /etc/nginx/ssl/catchall.crt;
    ssl_certificate_key /etc/nginx/ssl/catchall.key;

    error_page 404 /404_CatchAll.html;

    # Everything is a 404
    location / {
        return 404;
    }

    location /404_CatchAll.html {root /var/www/html/;}
}

[-] Rick_C137@programming.dev 1 points 2 days ago

The full working code:

server {
    listen 443 ssl;
    server_name _;
    ssl_certificate /etc/nginx/ssl/catchall.crt;
    ssl_certificate_key /etc/nginx/ssl/catchall.key;

    error_page 404 /404_CatchAll.html;

    # Everything is a 404
    location / {
        return 404;
    }

    location /404_CatchAll.html {root /var/www/html/;}
}
[-] Rick_C137@programming.dev 1 points 2 days ago

ok I've found something that ~works !

	server {
		listen 443 ssl;
		server_name _;
		ssl_certificate /etc/nginx/ssl/catchall.crt;
		ssl_certificate_key /etc/nginx/ssl/catchall.key;

		error_page 404 /404.html; #at /var/www/html/

		location /404.html {internal;}

		return 404;
	}

so i get the default 404 html from nginx. but not the one that I specified error_page 404 /404.html; any ideas ?

[-] Rick_C137@programming.dev 1 points 2 days ago

line 5 you mean ?

error_page 404 /404.html; #this one ?
1
submitted 2 days ago* (last edited 2 days ago) by Rick_C137@programming.dev to c/webdev@programming.dev

Hi,

You might be aware that if a DNS request point your nginx server.

and this later do not have a server rule for it , nginx will server anyway the first server found in your config file, WTF !

So I've found https://stackoverflow.com/a/23281442

server {
  listen       80 default_server;
  server_name  everythingelse;

  error_page 404 /404.html;

  # Everything is a 404
  location / {
    return 404; #return the code 404
  }

  # link the code to the file
  location = /404.html {
    #EDIT this line to make it match the folder where there is your errors page
    #Dont forget to create 404.html in this folder
    root  /var/www/nginx/errors/;
  }
}

But this is not working !

I made one of my domain pointing to this nginx server, and he still server another site aka server For httpS for http nothing appear..

Thanks.

-10

cross-posted from: https://programming.dev/post/13465911

Hi,

I'm confuse about those mandatory legal notices that governments impose for websites..

Before going further I invite you to read:
A Declaration of the Independence of Cyberspace
and
Discourse on Voluntary Servitude[^1] \

From all the articles^2 that I read about the mandatory notice to display for website none of them reference the URL of their claim !! / of the legal text !! WTF[^links]

Internet is by essence world wide, and when reading all those legal requirement it's seem that you should display notices for EVERY country !

it's seem also that if you own a private website, just for your own or family use, like for example a web file hosting services. (NextCloud etc..) You should comply with the same requirement that are asked for company ! again... WTF !

Also I don't understand, why make mandatory those notices...(beside the scam (money) ) , I'll come back to this below.

  • If you want to buy something off a website, and this later do not mentions any legal address , contact info and so on, the responsibility to buy or not should be only yours. (For example, will you buy a yogurt in the supermarket if there were no brand, contact info on the packing or bill ?)
  • if the state want to ~~censor~~ "regulate" a website on the old internet[^OI] there is plenty of way to know who is the author or at the very least where is it hosted..
  • if a website use/distribute a copyrighted© elements. The right holder can do/contact in the following order:
    • check the website for contact (if any)
    • check the DNS record
    • check the hosting
    • contact the owner of the IP (IP are leased by company../ ISP )

So there is no sense to ask everyone that extra heavy burden. The only advantage is for law firm (and those cookies related firm) that make a profit out of it. I heard in my entourage peoples that had pay thousandth of $$ to generate those text, keep up to date etc.. even for small website.

  • If you think those legal notice are a good thing please do not hesitate to motivate your answer.
  • If you have any good links about it, feel free to share.
  • What are you doing your self on website of customer and/or for your private websites ?
  • if you know a Lemmy community worth to share this post, step forward.

Thanks...

[^1]:https://en.wikipedia.org/wiki/Discourse_on_Voluntary_Servitude
https://archive.org/details/0000-00-00-00-etienne-de-la-boetie-00_202201/1548-00-00_Discourse%20on%20Voluntary%20Servitude_1942_org/mode/2up \

https://www.websitepolicies.com/blog/legal-requirements-for-websites [^OI]:The one that you are using now with the domains scam. A future internet might be using TOR or GNU Name System

[^links]: if you have those links feel free to share !

-6
submitted 2 months ago* (last edited 1 month ago) by Rick_C137@programming.dev to c/webdev@programming.dev

Hi,

I'm confuse about those mandatory legal notices that governments impose for websites..

Before going further I invite you to read:
A Declaration of the Independence of Cyberspace
and
Discourse on Voluntary Servitude[^1] \

From all the articles^2 that I read about the mandatory notice to display for website none of them reference the URL of their claim !! / of the legal text !! WTF[^links]

Internet is by essence world wide, and when reading all those legal requirement it's seem that you should display notices for EVERY country !

it's seem also that if you own a private website, just for your own or family use, like for example a web file hosting services. (NextCloud etc..) You should comply with the same requirement that are asked for company ! again... WTF !

Also I don't understand, why make mandatory those notices...(beside the scam (money) ) , I'll come back to this below.

  • If you want to buy something off a website, and this later do not mentions any legal address , contact info and so on, the responsibility to buy or not should be only yours. (For example, will you buy a yogurt in the supermarket if there were no brand, contact info on the packing or bill ?)
  • if the state want to ~~censor~~ "regulate" a website on the old internet[^OI] there is plenty of way to know who is the author or at the very least where is it hosted..
  • if a website use/distribute a copyrighted© elements. The right holder can do/contact in the following order:
    • check the website for contact (if any)
    • check the DNS record
    • check the hosting
    • contact the owner of the IP (IP are leased by company../ ISP )

So there is no sense to ask everyone that extra heavy burden. The only advantage is for law firm (and those cookies related firm) that make a profit out of it. I heard in my entourage peoples that had pay thousandth of $$ to generate those text, keep up to date etc.. even for small website.

  • If you think those legal notice are a good thing please do not hesitate to motivate your answer.
  • If you have any good links about it, feel free to share.
  • What are you doing your self on website of customer and/or for your private websites ?
  • if you know a Lemmy community worth to share this post, step forward.

Thanks...

CrossPosted on:https://lemmy.ml/post/15583047

[^1]:https://en.wikipedia.org/wiki/Discourse_on_Voluntary_Servitude
https://archive.org/details/0000-00-00-00-etienne-de-la-boetie-00_202201/1548-00-00_Discourse%20on%20Voluntary%20Servitude_1942_org/mode/2up \

https://www.websitepolicies.com/blog/legal-requirements-for-websites [^OI]:The one that you are using now with the domains scam. A future internet might be using TOR or GNU Name System

[^links]: if you have those links feel free to share !

1

Hi,

Unfortunately I need to register a domain name for the "old" Internet. So this one with the domain name scam[^DomainScam] and so on..

So which registrar would you recommend that is the closed regarding the FLOSS / GNU philosophy ?

And then I hope the world, will migrate to something better than this WWW scam and I could get rid of this domain..

Thanks.

[^DomainScam]: - https://www.namepros.com/threads/is-the-domain-industry-like-a-ponzi-scheme.725672 - https://www.w3.org/2014/strint/papers/65.pdf - https://www.gnunet.org/en - https://www.torproject.org - https://youbroketheinternet.org

18

cross-posted from: https://programming.dev/post/10497245

Hi,

For websites I've always restricted username to use Apostrophe ' and " and some times even space . If a website necessitate special character then I prefer to create an additional DB field ~DisplayName.

It's easier to forbid the use of Apostrophe, otherwise you will have to escape also your search query to match what has been recorded in the DB.

On the topic I've this https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense

But if you have better documentation feel free to share :)

Thanks

5

Hi,

For websites I've always restricted username to use Apostrophe ' and " and some times even space . If a website necessitate special character then I prefer to create an additional DB field ~DisplayName.

It's easier to forbid the use of Apostrophe, otherwise you will have to escape also your search query to match what has been recorded in the DB.

On the topic I've this https://security.stackexchange.com/questions/202902/is-single-quote-filtering-nonsense

But if you have better documentation feel free to share :)

Thanks

[-] Rick_C137@programming.dev 2 points 4 months ago

I've received a lot of reactions on the original post: https://programming.dev/post/10465121

But if someone is involved with the development of Thunderbird I think this is worth reading: https://programming.dev/comment/7677398

For my part I will use the OpenPGP sigin tools for now.

Cheers.

[-] Rick_C137@programming.dev 3 points 4 months ago* (last edited 4 months ago)

Thank you all for your quick reactions !!

To summarize if I want to use the PDF built-in signing I will need to convert my OpenPGP into a X.509 cert otherwise I can simply use the OpenPGP file signing

I want to stick to the UNIX Philosophy especially:

Write programs that do one thing and do it well.

So I will use the OpenPGP signing tool :)

Thanks !

5

cross-posted from: https://programming.dev/post/10465121

Hi everyone,

I was wondering if you know a way to use the generated OpenPGP key created trough Thunderbird to sign PDF's ?

(Devuan distro)

Thanks.

32
submitted 4 months ago by Rick_C137@programming.dev to c/linux@lemmy.ml

Hi everyone,

I was wondering if you know a way to use the generated OpenPGP key created trough Thunderbird to sign PDF's ?

(Devuan distro)

Thanks.

7
submitted 5 months ago* (last edited 4 months ago) by Rick_C137@programming.dev to c/javascript@programming.dev

~~ cross-posted from: https://programming.dev/post/9179830 ~~

Hi,

I'm loading some content with XHR (aka Ajax) the loaded input elements that have a invalid value assigned are not checked trough the validation process.

so the CSS styling with :invalid is for example not working etc..

is there a way to force the validation process on those elements ?

edit: Browser is Firefox

Thanks.

2

cross-posted from: https://programming.dev/post/7667731

Hi,

As CSS do not have a color-overlay[^1] filter.

There is some heavy work around:

https://isotropic.co/tool/hex-color-to-css-filter/

that use a combination of CSS filter to target the desired color...

Those online calculators are neat, but I would like an offline version, in case the provided one become inaccessible.

I've downloaded the zip of https://codepen.io/sosuke/pen/Pjoqqp

But it doesn't work locally.. :/

So I would like to know, if someone know one in 🐍 Python ? or how can I make one then ?

Or if someone know another way to have the color-overlay[^1] effect in html\css, I'm all ears !

Thank.

[^1]: To apply like in Photoshop a color on the shape of the image (so not on the parts that have transparency.

3

Hi,

As CSS do not have a color-overlay[^1] filter.

There is some heavy work around:

https://isotropic.co/tool/hex-color-to-css-filter/

that use a combination of CSS filter to target the desired color...

Those online calculators are neat, but I would like an offline version, in case the provided one become inaccessible.

I've downloaded the zip of https://codepen.io/sosuke/pen/Pjoqqp

But it doesn't work locally.. :/

So I would like to know, if someone know one in 🐍 Python ? or how can I make one then ?

Or if someone know another way to have the color-overlay[^1] effect in html\css, I'm all ears !

Thank.

[^1]: To apply like in Photoshop a color on the shape of the image (so not on the parts that have transparency.

-15

cross-posted from: https://programming.dev/post/6788379

Hi,

As we might all know ( Early adopter of Lemmy ). Lemmy has been (also) made to give an alternative to the censor kingdom of Reddit ! https://en.wikipedia.org/wiki/Lemmy_(software)

And further more Lemmy is fLOSS 😍

Great ! but watch out ! we don't want that Lemmy take the same path as Reddit did ! ( hopefully this is limited as it run as a ~Federated model )

Anyways, I believe to avoid censorship and jeopardize users privacy the following should be considered by Instance admins and moderators.

  • Avoid as possible a mandatory email to register Doing so is not reducing spam or whatever you're afraid ! It's limiting users to create account that preserve their anonymity ! If you don't know why anonymity is important I'll suggest you to dig this website to start with https://www.laquadrature.net/en/support/#chiffrement BTW if I couldn't be anonymous, I wouldn't write any post on Lemmy, as I'm not living in a free country !! Look on other instances some admin have found clever way to circumvent bots without the need of an email.

  • Also Lemmy don't require too much of moderation ! as any user can use the block feature in their options so you should not censor content in behave of others !

If the freedom of expression is limited to the ideas that we like, it is not freedom of expression. Noam Chomsky.

Cheers,

[-] Rick_C137@programming.dev 2 points 6 months ago

Indeed, but in AOSP there is no GMS and that already better !

[-] Rick_C137@programming.dev 3 points 7 months ago

Has I found nothing, I've write a piece of code in Python 🐍 ! and compile it for Windows..

[-] Rick_C137@programming.dev 3 points 7 months ago

Thank you @Vilian@lemmy.ca Seem great, I'll keep it for later :)

But not for what I need now, as

Mutt is a small but very powerful text-based mail client for Unix operating systems

and it's a "full" client, I need just the SMTP functionality.

[-] Rick_C137@programming.dev 2 points 7 months ago

ok I manage to send my post ! (it look like a lemmy bug... , do you know where to report it ? )

it seem that lemmy didn't support the following

[-] Rick_C137@programming.dev 3 points 7 months ago

and weirdly, I can post here...

[-] Rick_C137@programming.dev 2 points 7 months ago* (last edited 7 months ago)

@UFODivebomb@programming.dev & @ExperimentalGuy@programming.dev

Thank you for your input !

I've finally ~~used~~ been forced to use https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API and DOMParser().parseFromString()

I say forced, because so far it's only that Prehistoric JS available for the front-end, HOPEFULLY there is some coming kick-ass technology to get rid of JS --> https://brython.info ❤️

view more: next ›

Rick_C137

joined 8 months ago