GithubHelp home page GithubHelp logo

hackspaceos's People

Contributors

dependabot[bot] avatar glowingkitty avatar jonathanfromm avatar shaygover avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hackspaceos's Issues

ssb (Secure Scuttlebutt) Event support

HackspaceOS looks great. It looks like you could add a ssb gathering integration with HackspaceOS’s events. In database/models/events.py in the publish method, it calls create_discourse_event and a commented-out create_discourse_event. There could be a create_ssb_gathering method added and called from there. The other create*_event methods instantiate something from _apis/models. So you could make a _apis/models/gathering.py, put code in there to publish and edit gatherings, and call it from _database/models/events.py.

To create and edit gatherings, call RPC methods on your pub’s ssb-server. There are a few ways to do this. Is your pub ssb-server running on the same machine and user as HackspaceOS, or a different one?

To publish an SSB gathering, publish a SSB message with type “gathering”. The key of the resulting message is your gathering id. Then publish a message with type “about”, referencing the created gathering, and including data describing it, i.e. title, description, start date-time, location, and image. (There is no end time or duration field; that information could be put in the description.) To edit the gathering, publish another “about” message referencing the gathering and including the fields to change. Optionally include the previous about messages in a “branch” property.

I can go in more detail about this and give examples if you want.

Here is a draft implementation (untested), roughly matching the existing meetup & discourse integration:
0001-Add-Secure-Scuttlebutt-Gatherings-for-Events.patch

This uses sbotc to communicate with ssb-server. So either ssb-server and HackspaceOS must run as the same user, or you can do something so that the HackspaceOS instance can access the pub’s ssb key and/or unix socket in its ~/.ssb directory. Or put a new key for it there and add its id to the pub’s “master” config array.

Details on our secure scuttlebutt server at https://www.noisebridge.net/wiki/Pub

Content-Security-Policy in head?

The Mozilla documentation describes something called a Content-Security-Policy which is becoming more used in websites, especially those which serve up pages to smartphones.

From personal experience, they're a pain.

The Cordova (Adobe PhotoGap) documentation included this.

Here are some example CSP declarations for your `.html` pages:

    <!-- Good default declaration:
        * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
        * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
        * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
            * Enable inline JS: add 'unsafe-inline' to default-src
            * Enable eval(): add 'unsafe-eval' to default-src
    -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">

    <!-- Allow everything but only from the same origin and foo.com -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' foo.com">

    <!-- This policy allows everything (eg CSS, AJAX, object, frame, media, etc) except that 
        * CSS only from the same origin and inline styles,
        * scripts only from the same origin and inline styles, and eval()
    -->
    <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

    <!-- Allows XHRs only over HTTPS on the same domain. -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' https:">

    <!-- Allow iframe to https://cordova.apache.org/ -->
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' https://cordova.apache.org">

I've noticed that my own websites will happily work on a standard browser (Safari on macOS). But then you try the same thing from an iOS or Android device and suddenly they're getting all paranoid about the same things you did before. There will be some kind of terse error in the console log which boils down to either no CSP or it doesn't like it somehow.

create online event/ translate this page/ edit page broken

'create an online event' is broken in several ways

  1. hebrew title is not reognized, blocking further progress , see pic
  2. i got past that this morning somehow and the event required something else I didn't have , can't recall at this point.

also 'translate this page' and 'edit page text' simply lead to this github which is great and all but its totally unclear how to eactually edit the page , and in any case doing a PR or the like still doesn't actually change the page, some superuse wwould have to ul/dl the page or the like, making the whole business rather painful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.