Coder Social home page Coder Social logo

diimdeep / 1p2keepass Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 11.0 12.55 MB

๐Ÿ” 1Password (1pif) to ๐Ÿ” KeePass 2.x plugin ๐Ÿ”Œ

License: GNU General Public License v2.0

XSLT 20.92% C# 76.65% Makefile 2.19% Shell 0.23%
1password keepass keepass-plugin plugin

1p2keepass's People

Contributors

diimdeep avatar rr-rosendahl avatar tgsoftware 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

Watchers

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

1p2keepass's Issues

Crash on Import

I have a strange crash on import whilst importing a Login record.
I have copied the 1PIF data below obviously removing sensitive data

{"uuid":"UUID VALUE",
 "createdAt":1461778322727,                <-------------- This is bigger than usual!
 "updatedAt":1461778930,
 "title":"TITLE TEXT",
 "typeName":
 "webforms.WebForm",
 "securityLevel":"SL5",
 "openContents":{"contentsHash":"hashvalue","securityLevel":"SL5"},
 "contentsHash":"hashvalue",
 "secureContents":{
 	"fields":[
		{"name":"Username","designation":"username","value":"usernamevalue"},
		{"name":"Password","designation":"password","value":"passwordvalue"}
	],
	"notesPlain":"Some Text"
  }
}

As you can see for some reason the createdAt is represented in Milliseconds, this results in a crash at
DateTimeExt at

dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime();

I have no idea why this export contains that value as all the others seemed to be OK but I applied this simple fix to DateTimeExt.cs FromUnixTimeStamp to resolve in my local copy and wanted to share it with you.

                
if (unixTimeStamp > 20000000000)
{
    dtDateTime = dtDateTime.AddMilliseconds(unixTimeStamp).ToLocalTime();
}
else
{
    dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime();
}

If the value is < 20000000000 then a date up to 2603 can be supported, if greater than 20000000000 then it will assume Milliseconds and therefore an earliest date of Aug 1970.

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.