Git Product home page Git Product logo

bin's People

Contributors

alistair1231 avatar alk3pinjection avatar allgreed avatar chriswmartin avatar daslulilaan avatar dependabot[bot] avatar egor-tensin avatar noisytoot avatar shaaraddalvi avatar w4 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

bin's Issues

[Feature Request] Add cross-platform key combination for saving pastes

The current key combination for saving a paste unfortunately cannot be executed on Windows or Linux machines since the ⌘ key is only available on a macOS keyboard. The pastebin software Haste, for example, uses the cross-platform key combination CTRL+S for saving a paste.

It would be great if that one could be added as an alternative to the current key combination.

[Feature Request] Add new hotkeys for common workflows

I'm currently using the pastebin Haste and the only thing that's keeping me from switching to bin right now is the absence of two of its hotkeys. In Haste, it's possible to save a paste with CTRL+S (done in bin with ALT/CTRL+Enter), duplicate the current paste for editing with CTRL+D (not implemented in bin) and most importantly, create a blank new paste for editing with CTRL+N (not implemented in bin). This is what these workflows look like in Haste:

2020-04-16_16-09-08

The hotkeys in bin don't need to be same of course, but it would be nice for these two workflows to be supported in this software as well.

RUSTSEC-2022-0048: xml-rs is Unmaintained

xml-rs is Unmaintained

Details
Status unmaintained
Package xml-rs
Version 0.8.4
URL https://github.com/netvl/xml-rs/issues
Date 2022-01-26

xml-rs is a XML parser has open issues around parsing including integer
overflows / panics that may or may not be an issue with untrusted data.

Together with these open issues with Unmaintained status xml-rs
may or may not be suited to parse untrusted data.

Alternatives

See advisory page for additional details.

Document endpoints in the README

Hello,

Quick question, is there any reason you decided to use PUT to publish a paste and not POST ? Although there is no problem from the perspective of the http rfc to use PUT to create a new record, POST is more common.

Actually, whould it be possible to list all the http routes (verb + endpoint + payload + description) in the readme ? I'm not fluent with rust/rocket so I'm not confident to look for answer in the source code.

Btw, thank you for your minimalist bin, it really rocks ! :)

Proposal

Could you add the lines numbers. To find quickly a specified line by an error. Thanks :)

Bash syntax highlighting is broken for repeated expressions and multi-line comments

Environment:

  • OS: Debian 10
  • Bin: 2bbab69 (built from source)

Expected syntax highlighting:

  • All comments are greyed out.
  • All if expressions are highlighted.
#!/bin/bash

# This is a comment
# This is also a comment

# This is a comment
# This is also a comment

if [ "a" = "b" ]; then true; fi
if [ "b" = "c" ]; then false; fi

if [ "a" = "b" ]; then true; fi
if [ "b" = "c" ]; then false; fi

# This is a comment
# This is also a comment

# This is a comment
# This is also a comment

if [ "a" = "b" ]; then true; fi
if [ "b" = "c" ]; then false; fi

if [ "a" = "b" ]; then true; fi
if [ "b" = "c" ]; then false; fi

# This is a comment
# This is also a comment

# This is a comment
# This is also a comment

Actual syntax highlighting:

  • Only the first comment is greyed out. This "limit" only resets when two comment lines are separated by an expression. A blank line does not reset the limit.
  • Only the first if expression is highlighted. This "limit" only resets when two lines with if expressions are separated by a blank line and a comment line. A blank line or comment line by itself does not reset the limit.

Running behind reverse proxy

I want to run bin behind an Apache httpd reverse proxy with path /bin, but there are some issues I think: bin mounts itself on / and e.g. the index.html form action is /. Any idea how to fix this? Could you perhaps introduce support for this by making the endpoint configurable?

Thanks!

broken page layout

Hello,

I'm running bin v1.0.4 on Debian. I was use to publish bins via curl, it was fine on v1.0.2 but with the latest version the layout is broken.

See by yourself: https://bin.drlazor.be/ilshummurl

The command I used was as follow:

$ cat <<EOF | curl -s -X PUT --data-binary @- https://bin.drlazor.be
pipe heredoc> hello
pipe heredoc> world
pipe heredoc> this
pipe heredoc> is
pipe heredoc> a
pipe heredoc> test
pipe heredoc> EOF

This only affect publishing bins via curl, via the web page it works fine.

Docker pull unexpected EOF

I tried pulling the docker image from Github, but it prompts the EOF error:

image

image

image

I tried this on two machines. One of them has the following version numbers:

Docker 20.10.14
tar 1.34
Fedora 25

RUSTSEC-2023-0003: git2 does not verify SSH keys by default

git2 does not verify SSH keys by default

Details
Package libgit2-sys
Version 0.12.26+1.3.0
URL GHSA-m4ch-rfv5-x5g3
Date 2023-01-20
Patched versions >=0.13.5, <0.14.0,>=0.14.2

The git2 and libgit2-sys crates are Rust wrappers around the
libgit2 C library. It was discovered that libgit2 1.5.0
and below did not verify SSH host keys when establishing an SSH connection,
exposing users of the library to Man-In-the-Middle attacks.

The libgit2 team assigned CVE-2023-22742 to this
vulnerability. The following versions of the libgit2-sys Rust crate have been
released:

  • libgit2-sys 0.14.2, updating the underlying libgit2 C library to version 1.5.1.
  • libgit2-sys 0.13.5, updating the underlying libgit2 C library to version 1.4.5.

A new git2 crate version has also been released, 0.16.1. This version only
bumps its libgit2-sys dependency to ensure no vulnerable libgit2-sys versions
are used, but contains no code changes: if you update the libgit2-sys version
there is no need to also update the git2 crate version.

You can learn more about this vulnerability in libgit2's advisory

See advisory page for additional details.

Dockerfile does not build

Getting this when running docker build:

   Compiling rocket_http v0.5.0-dev (https://github.com/SergioBenitez/Rocket?branch=async#78c8ac8c)
   Compiling askama_shared v0.9.1
error: proc macro panicked
   --> /usr/local/cargo/git/checkouts/rocket-8bf16d9ca7e90bdc/78c8ac8/core/http/src/parse/uri/parser.rs:119:34
    |
119 |             let path_and_query = pear_try!(path_and_query(is_pchar));
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: message: called `Option::unwrap()` on a `None` value
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `rocket_http`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
The command '/bin/sh -c cargo +nightly build --release' returned a non-zero code: 101

unable to build; open function expects 1 argument, 0 provided

When attempting to use cargo to build this application, we receive the following:

error[E0061]: this function takes 1 argument but 0 arguments were supplied
  --> src/main.rs:68:3
   |
68 |     .open()
   |      ^^^^- supplied 0 arguments
   |      |
   |      expected 1 argument

error: aborting due to previous error

For more information about this error, try `rustc --explain E0061`.
error: could not compile `bin`

To learn more, run the command again with --verbose.

I added a variable to see what would happen and it is looking for a ByteUnit:

   Compiling bin v1.0.5 (/home/cpupaste/pastebin)
error[E0308]: mismatched types
  --> src/main.rs:68:8
   |
68 |     .open(data)
   |           ^^^^ expected struct `ByteUnit`, found struct `std::string::String`

error: aborting due to previous error

Any insight on how to fix this would be great!

NixOS Module

Considering there's already a Nix example in the README, would it be possible to have an official derivation for Nixpkgs and a module to enable it as a service?

I would love to have this up and running on my NixOS-based server!

Cheers

Dockerfile build fails

Hi!
Thanks for having bin opensource!
I'm trying to build the Dockerfile, but it seems like it can't import something. Would you be able to take a look, please?

   Compiling yaml-rust v0.4.4
   Compiling owning_ref v0.4.1
error[E0432]: unresolved import `crate::arch::x86_64::__m64`
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd-0.3.3/src/api/into_bits/arch_specific.rs:51:15

The full errors after this are available here https://bin.gy/hickudylle.
Thank you!

RUSTSEC-2021-0139: ansi_term is Unmaintained

ansi_term is Unmaintained

Details
Status unmaintained
Package ansi_term
Version 0.12.1
URL ogham/rust-ansi-term#72
Date 2021-08-18

The maintainer has adviced this crate is deprecated and will not
receive any maintenance.

The crate does not seem to have much dependencies and may or may not be ok to use as-is.

Last release seems to have been three years ago.

Possible Alternative(s)

The below list has not been vetted in any way and may or may not contain alternatives;

See advisory page for additional details.

glibc version wrong in container

The example container when built and run gives the following error

/pastebin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /pastebin)                                                                                            
/pastebin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /pastebin)                                                                                            
/pastebin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /pastebin)

The version of the libc6 package available in debian bullseye is 2.31-13+deb11u7 which is too old to meet these requirements.

I also checked in the new debian bookworm release but the libc6 package there is too new 2.36-9+deb12u3

Is there a hard requirement on those versions or a way to install the required version without compiling from source?

Can you please generate a build for windows :)

Hi I'm a windows user. I can install this in my ubuntu VM but I don't see a build for windows.
I've never used rust before and the cargo build --release failed

Below is the complete error if you're interested.

   --> C:\Users\ShmuelDev\.cargo\registry\src\github.com-1ecc6299db9ec823\packed_simd-0.3.3\src\lib.rs:202:1
    |
202 | / #![feature(
203 | |     repr_simd,
204 | |     const_fn,
205 | |     platform_intrinsics,
...   |
215 | |     custom_inner_attributes
216 | | )]
    | |__^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: Could not compile `packed_simd`.

[Feature Request] Customization

Hello,

Do you think it would be possible to offer customization of the syntax highlighting theme in a fairly simple way?

Or at least, is it possible to tell me how I can change it before compiling? I'm having a hard time understanding at what level it's set (I don't think just changing s.get_theme("OneHalfDark") to s.get_theme("base16-eighties") will be enough? Apparently syntect supports base16 themes, but I don't understand how it all works).

EDIT: I tried to just change the theme name, it didn’t work, as expected.

Thanks.

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.