Coder Social home page Coder Social logo

westberliner / checksum Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 15.0 2.24 MB

Plugin for Nextcloud and ownCloud to create hashes of files.

License: GNU General Public License v3.0

PHP 14.13% JavaScript 77.67% Vue 8.20%
owncloud nextcloud checksum validation

checksum's Introduction

Checksum

Plugin for Nextcloud to create hashes of files.

animation

Installation

In your Instance, simply navigate to »Apps«, choose the category »Files«, find the Checksum app and enable it.

Usage

Just open the details view of the file (Sidebar). There should be a new tab called "Checksum". Select a algorithm and it will try to generate a hash. If you want an other algorithm, just click on the reload button.

Possible algorithms are md5, sha1, sha256, sha384, sha512, sha3-256, sha3-512 and crc32.

Translation

If your language is missing, feel free to translate your language under transifex.

If you are not already a member of the transifex nextcloud project create an account and join the project.

Compatibility

  • This app was only tested on Nextcloud v20 to v21 and php v7.(2|4).
  • For older nextcloud versions check older releases.

checksum's People

Contributors

confusedguy9 avatar dependabot[bot] avatar djcrashdummy avatar eisfunke avatar enoch85 avatar fanonwue avatar jospoortvliet avatar kg3rk3n avatar mariusbluem avatar nextcloud-bot avatar nextgen-networks avatar sebastian-sauer avatar st3iny avatar the-edev avatar valdnet avatar westberliner 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

Watchers

 avatar  avatar  avatar  avatar

checksum's Issues

save checksums

it would be awesome if you ran the check sum if it saved it to the files metadata

[1.1.2] Translations missing

When using it on an German installation, then the menu is shown only in English.
It looks the translations is also missing in the source code, because the folder is empty.

Update to recent Nextcloud versions

I forked and updated this app to work with nextcloud v20 and v21. I refactored the usage of the deprecated nextcloud api and leveraged the new server container interface and the abstract storage backend. This means that my fork is now independent of the used storage backend. However, those changes are not compatible with owncloud.

I would be happy to send a PR if you are willing to drop support for owncloud.
Feel free to close this issue if not.

publish current version via nextcloud app-store

is it possible to publish the current version (something >0.3.5) via the nextcloud app-store?

yes i've read #25 and #24, but #26 (comment) is still valid: in the app-store (just scroll down and have a look) there is still 0.3.5 the latest version and so within nextcloud checksum appears to be incompatible with NC13.


btw: just want to mention it, because it seems very interesting resp. strange to me...
in the nextcloud app-store the latest version is 0.3.5 and therefore also updating within nextcloud isn't possible and checksum is deactivated after upgrading to NC13 due to max-version of the app.
so far so good... BUT why is a NC13-compatible version (0.3.5) listed at the app-store-site?!? ...and i guess because of that also the nice little app Can I update? says checksum should already be available for NC13.

@westberliner do you have any idea about this behavior? or if not and it is an issue of nextcloud, already pinged the nextcloud-guys?

Transifex project URL?

Hi,

noticed config for Transifex there, but cannot find on list in Nextcloud project on Transifex. May I ask you for help where to translate please?

Thanks :-)

What are people using this app for? Is my use case supported?

I have a specific use case for this OC app, and wondering whether it's supported. And wondering what else people have used this app for.

Use case: file backup verification

Users will back up data from their local machines to OC, and wish to use checksum to verify data integrity. I suppose the files would need checksums already...

Deployment of v0.4.5

The release Server seems to be down. I get a 500 error. I'll wait and try it later again.

Checksum in right click context menu & for multiple files

I don't know if this is possible, but it would be nice if we could get checksums in any way (copy to clipboard, export as text file, etc.) from the right click context menu in Files.

This may even lead to getting checksums from multiple files at once. This would be much more convenient than opening details and getting checksums one at a time.

Generate checksums for multiple files or directories to check local copies

Closely related to #23 except generate the checksums on demand without downloading to check local copies.

If the output could be downloaded in a file or copied and pasted into a file in a format that can then be fed into "sha256sum -c " or "md5sum -c ", a set of files can be checked.

Alternatively an implementation of #28, compare feature, capable of comparing multiple checksums at once, for example the output of "sha256sum *" run locally, copied and pasted into the browser.

Use case scenario:

I work with multiple files from multiple machines, at least some of which do not have a Nextcloud sync client installed. Before making changes and uploading to Nextcloud, which serves as my master repository, it's tremendously helpful for me to be able to check the checksums provided by this project to make sure that my local copy is current. Thank you! One by one comparison however is tedious for more than a few files, so a feature to generate multiple checksums would be valuable.

Another more common use case:

A third party has shared a directory with me by public link, so I cannot use the Nextcloud client to sync them. I download all the files to my local machine. After some time, I want to quickly check if any of the files have changed since I downloaded them without downloading everything over again.

Thanks westberliner!

in settings manue maybe a way to do bulk checksumming

this would be after/if you choose to save the checksum to the file or not being able to like in the settings have it set a back ground task to check sum all your files

(would also be cool for it to if one is already there notify if the new one it does is different indicating file derogation )

(could also also if there are event hooks add a hook to check sum new files being added once they are fully uploaded )

Settingspage

Add a settings page for activating/deactivating algorithms and sort algorithm list.

Is this app also supported on PHP 7.3/7.2?

The app.xml states, that a PHP version of 7.4 is required to run the app while README.md states, that the app was only tested on PHP 7.4. As Nextcloud states in the official manual for version 20, it recommends PHP 7.3/7.4, but also supports 7.2.

So, my question is, is this app known to not work on versions below 7.4 or could a static code analysis / real tests show, that the app also works on 7.2/7.3 and so the minimum version of PHP required could set to an older version? I would help testing if it is not hopeless from the beginning.

I ask because I use Debian Stable which will hold on to PHP 7.3 until the next release of Bullseye in hopefully summer 2021, I do not want to use another package source than the official Debian repository and also because of Nextcloud still recommending 7.3 beside supporting 7.2, I think I'm not the only person with this problem.

Update frontend code

The frontend uses code that is deprecated and will be removed very soon. Additionally, the global jQuery will be removed soon too.

Nextcloud apps are now required to ship their own dependencies. Most apps I worked with solve this by using a bundler like Webpack.

@westberliner Are you fine with using Webpack to bundle the dependencies? I have worked on some official Nextcloud apps (e.g. mail) and could set up the stack. Note that this will increase the amount of work needed to maintain this app due to the added complexity. Otherwise, we have to drop the jQuery dependency and use the DOM APIs directly. This would eliminate the need for a bundler, but may turn the rendering code into a mess.

From app/files/js/filelist.js:

3699:		registerTabView: function(tabView) {
3700:			console.warn('registerTabView is deprecated! It will be removed in nextcloud 20.');

(Spoiler: It was not removed in version 20 but probably will be very soon).

Ref #45

Trouble installing the app from the app-store

owncloud 9.1.6 log shows the error: App can't be installed because the version in info.xml is not the same as the version reported from the app store

Thanks

(managed to install it by extracting the downloaded files in the apps folder)

Test checksums

It would be nice, when there is a possibility to check a checksum, like a input field, where I can input my checksum and then check a file.
In the case somebody sends me a file over the federated cloud system, to check if the file is broken.

Great app!!

This app is just awesome and saves me alot of time on every release I do for the Nextcloud VM.

Though I can't find it in AppStore for Nextcloud 15.0.2. It might be a temporary glitch but I figured you should know.

Keep up the good work! :)

Thanks!

Checksum always shows "File not found." in subdirectories

With Nextcloud 20.0.8 and PHP 7.2.24-0ubuntu0.18.04.7 and Checksum 1.1.0 for any algorithm I choose for files in subdirectories all I get in the Details / Checksum tab is something like:

SHA256:File not found.

Sample error log below shows an attempt on a file "ports.md" in subdir "work", but note there is no file separator in the exception error path that ends "/workports.md" so the fopen fails:

{"reqId":"ZnHCWQV1WY8kOGmbVjxq","level":3,"time":"2021-02-28T18:36:33+00:00","remoteAddr":"192.168.2.101","user":"john","app":"PHP","method":"GET","url":"/cloud/index.php/apps/checksum/check?source=%2Fworkports.md&type=sha256","message":{"Exception":"Error","Message":"fopen(/var/www/nextcloud/data/john/files/workports.md): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#355","Code":0,"Trace":[{"function":"onError","class":"OC\Log\ErrorHandler","type":"::","args":[2,"fopen(/var/www/nextcloud/data/john/files/workports.md): failed to open stream: No such file or directory","/var/www/nextcloud/lib/private/Files/Storage/Local.php",355,{"path":"files/workports.md","mode":"rb"}]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Local.php","line":355,"function":"fopen","args":["/var/www/nextcloud/data/john/files/workports.md","rb"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":480,"function":"fopen","class":"OC\Files\Storage\Local","type":"->","args":["files/workports.md","rb"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":300,"function":"fopen","class":"OC\Files\Storage\Wrapper\Encryption","type":"->","args":["files/workports.md","rb"]},{"file":"/var/www/nextcloud/apps/checksum/lib/Controller/ChecksumController.php","line":107,"function":"fopen","class":"OC\Files\Storage\Wrapper\Wrapper","type":"->","args":["files/workports.md","rb"]},{"file":"/var/www/nextcloud/apps/checksum/lib/Controller/ChecksumController.php","line":76,"function":"getHash","class":"OCA\Checksum\Controller\ChecksumController","type":"->","args":["/workports.md","sha256"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"check","class":"OCA\Checksum\Controller\ChecksumController","type":"->","args":["/workports.md","sha256"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Checksum\Controller\ChecksumController"},"check"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Checksum\Controller\ChecksumController"},"check"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Checksum\Controller\ChecksumController","check",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"checksum.checksum.check"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\Route\Router","type":"->","args":["/apps/checksum/check"]},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; CrOS x86_64 13597.94.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.186 Safari/537.36","version":"20.0.8.1","id":"603be2b2394a5"}

Automatically create checksums. Feature?

Hi!

I was wondering if there is a way to calculate hashes automatically on my files? Doing it manually on 200k files is not possible. If it is not possible, I would like to suggest it as a feature :)

M

Checksum compare

I would really like it if we had a field where we could dump the checksum it's supposed to be, then generate the checksum, and have it compare "match!" "do not match!" kind of thing.

Much easier than manually comparing the entire string.

Just a small convenience, would be appreciated! :D

Support NC25

Please test and release for NC25 which is to be released soon.

NC19 compatibility

I just activated the app on a NC 19RC2 setup on a FreeBSD/nginx/php7.3 environment. Didn't see any errors so far.
Would be good if someone with knowledge to the code could take a look before pushing the number of supported version.

fileInfo is null

when i enter the root directory, the var fileInfo sometimes is null

location is checksum.tabview.js:53

i use a dirty hotfix for myself now:

data = {source: fileInfo != null ? fileInfo.getFullPath() : "/"},

Prepare a hash amount for multiple files and folders.

The user downloads files and folders to the location provided.
Next, the plugin generates a hash of all the files.
We send it to the recipient.
It's like a little guarantee that the files will not be replaced.

Not compatible with OwnCloud 10.11.0

Hello

Just updated to OC 10.10 -> 10.11.0 and had to disable checksum to complete upgrade because not compatible (perhaps only version check?).

Best,

Nextcloud-installation and App-Update fails

the nextcloud-installation (In your Instance, simply navigate to »Apps«, choose the category »Files«, find the Checksum app and enable it.) does not work:

Client error response [url] https://herzberg-digital.de/checksum.tar.gz [status code] 404 [reason phrase] Not Found

and after a manual installation (of the latest release) it shows immediately an update, but it can't be applied. the only way to have everything as it should be, is to install the master manually.

and by the way: there are only releases for the old version with just MD5 and no choice (like it was installed within the nextcloud-apps just a week ago) in github present.

Compatibility with Nextcloud 14

Hi,

as you may have already seen, we have entered the beta phase for the release of Nextcloud 14. We usually try to keep up compatibility with previous app versions, but in some cases apps need some adjustments to properly work on new Nextcloud releases. With Nextcloud 14 there have been quite some changes in that regard:

You can find a list of all critical changes for app developers and admins at nextcloud/server#7827. You can run occ app:check-code to validate that there are no issues with deprecated or private message calls.

One critical change is the overall restructuring of the main template (nextcloud/server#9982) that might require some adjustments in your app.

We would be very pleased if you can make your app compatible with Nextcloud 14 and release a new version to the app store, so that users can properly test it and the upgrade experience to Nextcloud 14 will be even better than before.

Feel free to ask, if you have any questions regarding making your app compatible with Nextcloud 14.

Thanks for being part of the Nextcloud community and for all the effort you put into providing this app 🚀 .

Installation from app store fails, on OC 9.1.5

I get this error message when trying to install using the app store:

App can't be installed because the version in info.xml is not the same as the version reported from the app store

I've tried cloning the repo in the apps/ folder, and modifying values in the info.xml file.
It didn't fix it.

Any suggestions?

nextcloud13 install

nextcloud 13 rc2 on linux/apache/php7.2

when trying to enable checksum using nextcloud, nextcloud reports failure.
Message reported by nextcloud is "Extracted app checksum has more than 1 folder"

I was able to hand install, downloaded from Nextcloud App Store
extracted archive and copied the checksum folder to nextcloud/apps.
changed permissions
enabled in nextcloud apps settings

One thought is that the additional (maxOS) file "._checksum" in the archive may have been the cause of the issue

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.