Safe-CMS - Censorship is a thing of the past

It looks great @AndyAlban and @Shane! This app is top notch.

11 Likes

Hi all,

I had a little bit of free time this morning, so I added arbitrary file uploads. :slight_smile:

Now, you can upload files of any type, size, etc, to any domain which you own, these files can then be used in your blog posts, templates, etc.

Iā€™m very close to wrapping up this project now, l just decided to add this feature because it felt like something which was going to be really useful and it wasnā€™t a lot of effort, since I had already built to tooling for uploading to the network.

21 Likes

Good stuff. Canā€™t wait to try it!

2 Likes

Time to open up a Feature Request List for 1.1 of SAFE-CMS : ) Great work!

2 Likes

Hi all, the day is finally here. :slight_smile:

First of all, please be aware that this is a beta pre-release, things may be rough around the edges and there may be cross-platform issues, etc. The version 0.0.3 beta releases (for Windows and Linux) can be found here: https://github.com/badcodeltd/safecms/releases/tag/0.0.3.

Linux has had a lot less testing than Windows, so please consider it less stable, but Iā€™m free for the next 24 hours to make any hot-fix builds needed and Iā€™ll push a 0.0.4 release for Linux users if there are any major breaking bugs.

Installation instructions can be found here on the Github page: https://github.com/badcodeltd/safecms, though theyā€™re essentially ā€œrun the safe-cms executable after unzipping the directoryā€.

In addition, this also means that the code for the app is now open-source, so you can all have a good laugh at how bad it is. :wink: The code is released under an MIT license, so feel free to re-use any part of it.

A true 1.0.0 release should be within the coming 72 hours, including the MacOS build (and, if the electron-builder gods are friendly to us, NSIS installers for Windows and DMG installers for MacOS), but this beta release allows us to find anything weird, funky, nasty, etc.

On a personal note, Iā€™m really nervous right now, thereā€™s something oddly private about revealing a big chunk of code youā€™ve written from scratch to the world like this, but Iā€™m also really excited - not only did I manage to build the thing I said I would, but it has more features than expected and itā€™s being delivered early.

If youā€™re specifically interested in the code I wrote (and much I borrowed from the safe-examples) to interface with the SAFE Network, that can be found here: https://github.com/badcodeltd/safecms/tree/master/src/safe

Long live the SAFE Network.

Edit

If you build something using the network, please post it here, I would really love to see what people make with the tool.

Edit 2

Updated release number to 0.0.3

29 Likes

Wohoo! Trying it now. Do you want any bugs found or commentary posted here or on Github?

7 Likes

Amazing, thanks a tonne!

To Github on the issues page if you already have an account: Issues Ā· badcodeltd/safecms Ā· GitHub would be best, as Iā€™ll only have to copy them over anyway. :slight_smile:

For those reading who donā€™t have a Github account, donā€™t worry - if you post it here, Iā€™m more than happy to copy the issue over to Github for you.

7 Likes

Iā€™ll be pushing a 0.0.3 release to fix a directory permissions issue on startup for Linux users - this will be available within the next 15 minutes.

2 Likes

The ā€œDomainsā€ donā€™t work.

Windows 10-64. I try both, peruse 0.4.1 and SafeBrowser 0.9.0. As a test I revoke the SafeCMS Permissions and run again but the same results.

2 Likes

Okay, would you be able to do me a favour please @digipl?

Right click within the app and select ā€œInspect Elementā€, then click on ā€œConsoleā€ within the window which pops up.

Try to create a domain, and let me know what error appears. :slight_smile: Please send it to me directly as a message instead of posting it here, as it will likely contain some personal information about your machineā€™s directory structure, etc. Thanks!

Edit

This seems to be specific to users who have previously created domains with the project decorum wallet, Iā€™m adding a workaround for this now for version 0.0.3, but this shouldnā€™t effect other users.

4 Likes

Good to know it just wasnā€™t a problem for me. Same issue using prebuilt binary and build from source via github. Also, when I run ā€œnpm packageā€ I get an error. Latest Ubuntu ā€˜Artfulā€™, linux x64, fresh SAFE account.

2 Likes

Version 0.0.3 is now available, I believe I have fixed both the directory permissions issue discovered by @JPL and the publicName decryption issue discovered by @digipl

On my local linux VM, I was encountering some issues where the Safe-CMS would refuse to render while the Safe Browser window was still open, I have no idea why I encountered this, as no one else seems to be, but itā€™s something Iā€™m looking in to. If you donā€™t get a loading screen (but instead get a blank screen) it may be worth closing the Safe Browser after authenticating and approving the app (and report this back to me so I can look in to why) as itā€™s tricky to reproduce, and could simply be a memory issue, or similar.

@jlpell Iā€™ve removed npm package from the package.json, this was legacy, I use npm dist-linux or npm dist-windows instead. :slight_smile:

Edit

I can confirm from a private conversation with @digipl and @JPLā€™s post here that the two issues encountered in 0.0.2 have been fixed by 0.0.3.

8 Likes

I am also getting this error on Fedora. Closing Peruse allows the app to render properly, as you say.

1 Like

Yeah, Iā€™m not exactly sure why thatā€™s happening on Linux, it seems that the Electron window loadUrl function doesnā€™t actually return anything until the Safe Browser process is closed - but that makes no sense, since the Safe Browser call isnā€™t executed until after the page is loaded.

So essentially, the page doesnā€™t load, because something which happens after it has already loaded is stopping it from loading. :neutral_face:

I have a feeling itā€™s either an issue with threading, or itā€™s a function of Electron which considers the Safe-CMS a ā€œhiddenā€ window because the Safe Browser is loaded on top of it, so Electron is pausing the render thread. Iā€™m sure itā€™ll be a one line configuration change, itā€™s just figuring out which flag I need to set.

1 Like

OK, progress - I created a domain ā€˜helloooooā€™ and added a service ā€˜worldā€™ - all good. But when I tried to add a service to an existing domain ā€˜jpl7ā€™ I got an error (tried other strings too, same result).

3 Likes

Okay, thatā€™s good, could you give me some background information about JPL7? What tool was it created with (and version, if you know) does it already have any services, etc?

It was created using web-hosting-manager-v0.4.4-linux-x64 and it has no services

2 Likes

With @JPLā€™s help Iā€™ve diagnosed this issue and create an issue on Github to track it: Unable to create unencrypted services within encrypted domains Ā· Issue #6 Ā· badcodeltd/safecms Ā· GitHub I probably wonā€™t fix this tonight, but Iā€™ll likely tackle it tomorrow in my live stream on Twitch.

In short: websites created with the web hosting manager are encrypted (private) by default, the blogs I create are unencrypted (public) by default, I need to detect the encryption state of any given domain and create files and services with that same value.

9 Likes

EDIT: I was being dumb here (moral: donā€™t drink, watch TV and look at code at the same time)ā€¦ see my reply below.

Iā€™m curious about this Shane, can you say a bit more. Iā€™m wondering why WHM would create stuff that is published as private, or how it becomes public, as Iā€™m doing similar stuff - storing LDP resources, and would like these to be accessible similar to a website, but over LDP (a REST API Iā€™m providing in the client).

What exactly is created private by WHM and how can this be accessed by everyone?

Thanks.

EDIT: should have checked the issue before asking... so I see what is encrypted [here](https://github.com/maidsafe/safe_examples/blob/2f06aa65025a417a70cf6e93185dbe5ffcb44b9e/web_hosting_manager/app/safenet_comm/api.js#L715), but I'm confused how if this is private the WHM created public websites - ideas? Back to watching Aliens! :alien: Update: looking at the code in the ad breaks... it is encrypting the key (public name) and value (services MD name) that it inserts into the public names container. This makes no sense to me. @bochaco can you clarify? If they are encrypted, how can a website be public? Seems odd to encrypt a *public* names entry ever?!
4 Likes

Iā€™m still investigating this, but I will get back to you, itā€™s possible Iā€™m totally wrong - unfortunately, the code has absolutely no documentation for what toEncrypt is for and why some keys are encrypted and others arenā€™t. Iā€™ll post it in here once I discover why. :slight_smile:

6 Likes