Giter VIP home page Giter VIP logo

Comments (5)

renderorange avatar renderorange commented on July 22, 2024

https://github.com/renderorange/pasteburn/blob/master/lib/Pasteburn/Crypt/Storage.pm#L27

since expire time is a configurable option, it should be passed into the encode method as an argument.
as is, expire time is hard coded to 7 days, regardless of the config set by the admin.

from pasteburn.

renderorange avatar renderorange commented on July 22, 2024

this needs more research. crypt-storage-encode is used to encode the secret data to be stored into the database, not into the session. additionally, the session stored into the cookie for the user is set in the config.yml setting, default_duration: 604800. this value isn't tied to the value in the project config.

there are a couple things to do for this.
first is to set the cookie default_duration to match the project config, rather than hard code it to 60480.
second is to remove the encode method arg to set the duration of the data being stored in the database. according to documentation, an unset value doesn't set an expiration time on the data itself.

from pasteburn.

renderorange avatar renderorange commented on July 22, 2024

commit dff0924 removes default_duration and expires age settings so the secret expiration will only be controlled by the created_at field.

from pasteburn.

renderorange avatar renderorange commented on July 22, 2024

since removing expire times from the configs, the question now is, should a no expiration setting be allowed in the project configuration? if, say, someone wants to run this project on their own private network, and wants to set no expiration to secrets, should they be allowed?

I think yes.

from pasteburn.

renderorange avatar renderorange commented on July 22, 2024

or they could just not run the cronjob to delete expired secrets. going with that, and will update the documentation.

from pasteburn.

Related Issues (5)

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.