Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

55 commits

Auteur SHA1 Message Date
Atvaark
b31e77be2e Fix infohash decoding (#813)
Calculate the info hash of the uploaded torrent file
instead of the re-encoded torrent file.

The re-encoded torrent files only contain a subset
of the original info values and thus have a different hash.
2017-05-29 07:47:47 +10:00
hamper
1a608faa44 Add website link and remake flag to api (#797) 2017-05-28 14:22:39 +10:00
akuma06
3775e9dfb5 Torrent Hidden Option (to test before merging)
* Added a check on username and userId when converting torrent to JSON
* Added a checkbox for hidden in modepanel, torrent user edit and upload
* Added a Hidden field bool in torrent model and upload form
2017-05-27 20:33:40 +02:00
Eliot Whalan
75ec79b4e1
Merge branch 'dev' of https://github.com/NyaaPantsu/nyaa into dev 2017-05-27 11:51:36 +10:00
Eliot Whalan
fe77845ebf
Hopefully fix memleak 2017-05-27 11:50:31 +10:00
Eliot Whalan
04ce9e4a83
Fix bug adding torrents via magnet links 2017-05-27 11:08:18 +10:00
akuma06
0f66ec9340 Trackers in Torrents + Missing comments + Function renaming (#768)
* Missing comments and Function renaming

* Added some missing comments
* Renamed functions to get user followers/following
* GetFollowers to get followers
* GetLikings to get who the user is following

* Renaming + Add support of previous trackers

* Renaming user.Likings in user.Followers
* Renaming user.Liked in user.Likings
* Add a new string field Trackers in torrent model
* Trackers from torrent file are now populated to the databse
* Needed trackers are added to the torrent trackers if not provided or
if trackers is empty in DB (backward compatibility)

* New check and url encoding

* No more regex for verifying tracker url
* Encodes tracker url for "&" & "?" character possibly existing in
tracker url and breaking magnet link

* Improvements

* Trackers are now encoded in torrent.ParseTrackers
* Faster check by using the for loop of checktrackers
* No more boolean, we need to check len of array returned
* torrent.Trackers can be directly used in url as they are encoded like
: tr=tracker1&tr=tracker2&tr=...
2017-05-27 00:45:18 +02:00
akuma06
2773fe200d Golint friendly (#747)
* Making the code Golint friendly

* No exported variables when not needed
* Same for functions
* Simplifying Templates variables with a form basic template variable
and a modelList basic template variable

* Adapted templates to new template variables

* use of .Models instead of model list
* use of .Form instead of modelform

* Small fix

* Small fix 2

Forgot $.Form

* Reverting templateDir as a var
2017-05-25 21:54:58 +02:00
Eliot Whalan
b4b1b1c26a
go fmt all the code 2017-05-24 17:11:13 +10:00
akuma06
23e7d33bb6 Fixing insert of unneeded html tags in db
Added a Sanitize function in util
* Possibility to add model in it
* Already a preset default model

Comments shouldn't be allowed html, too difficult to check every comment
for broken html
Torrents are still allowed html tags but I don't think it should since
we use markdown.
2017-05-23 22:09:20 +02:00
akuma06
b75fc9ce53 update 2017-05-23 04:12:02 +02:00
Eliot Whalan
5a8ae4665d
Remove unused package 2017-05-23 11:06:43 +10:00
Eliot Whalan
991ed4178e
Don't convert hashes to base16 2017-05-23 10:06:55 +10:00
ElegantMonkey
331143e094 Verify torrent category on upload
Added a new package, "categories", with the valid categories for each
Nyaa and Sukebei. On upload, check if the category is present on
the valid ones. Also changed the template function Category_Nyaa and
Category_Sukebei to reflect this.
2017-05-22 13:25:04 -03:00
yiiT
0613b149d9 People forget about mods tools (#664) 2017-05-21 12:10:59 +10:00
akuma06
665c6e3116 added ircs support 2017-05-20 18:40:20 +02:00
akuma06
fff53fcb5b Website link are mandatory 2017-05-20 17:16:48 +02:00
akuma06
f09b8bcae7 Modified info string 2017-05-20 17:13:43 +02:00
akuma06
3ac73daa77 add irc support 2017-05-20 17:10:28 +02:00
akuma06
cf478a4235 Add Torrent WebLink + fixes
Simplifying messages util (no need to add everytime r)
2017-05-20 17:01:13 +02:00
PantsuDev
70f87e7aac finish repo transfer 2017-05-17 15:58:40 +10:00
Ramon Dantas
f351c2b047 Store torrent FileList info as bencoded data. (#530)
Use this instead of joining with forward-slashes because it's possible
that a torrent uses "foo/bar" as a filename or part of the directory list.
2017-05-16 07:45:47 +10:00
ElegantMonkey
720c27e38f Get FileList of new uploaded .torrent files 2017-05-14 12:28:48 -03:00
PantsuDev
ac92ddfeba Merge pull request #391 from sfan5/memes
Fixes & Features
2017-05-12 20:25:05 +10:00
sfan5
6b341c7b03 No captchas for trusted users or admins, closes #330 2017-05-12 12:05:36 +02:00
ayame-git
cf13efe3fe unborked 2017-05-12 05:21:40 +03:00
ayame-git
d5370705c0 converts hash to uppercase 2017-05-12 04:28:00 +03:00
ayame-git
af2c47c2f2 Merge branch 'master' of github.com:ewhal/nyaa into api 2017-05-12 00:59:35 +03:00
ayame-git
d94f8102d1 convert base32 hash to base16 2017-05-12 00:59:00 +03:00
Jeff Becker
059ea7d2a8 abstract out cache 2017-05-11 09:01:53 -04:00
ayame-git
da8b2dc9c4 base16 and base32 2017-05-11 07:23:02 +03:00
ayame-git
ac6f4f82fb welll fuck me 2017-05-11 07:12:54 +03:00
ayame-git
cc5baed9c1 stuff 2017-05-11 06:04:11 +03:00
sfan5
7bc395068d Fix modpanel torrent edit (#328)
* Fix modpanel torrent edits breaking torrents

* Fix hash not being monospace anymore

* Fix modpanel torrent edit strings

* Fix modpanel torrent edit creating a new user (wtf GORM)
2017-05-10 18:46:50 -05:00
akuma06
f94dc3103c Added edit torrent view mod panel & fix 2017-05-10 23:53:25 +02:00
sfan5
d98d918301 Allow marking uploads as remake 2017-05-10 22:11:37 +02:00
Eliot Whalan
e344896b2c clear cache on upload 2017-05-11 04:05:22 +10:00
Chris MacLeod
c9b72206a5 Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds

The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.

* Style changes and old code removal in router

Router needs a lot of work done to its (lack of) error handling.

* Dead code removal and style changes

Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.

* Finish dead code removal and style changes

Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.

* Fix accidental find-and-replace

* Style, error checking, saftey, bug fix changes

* Redo error checking erased during merge

* Re-add merge-erased fix. Make Safe safe.
2017-05-09 21:34:40 -05:00
ayame-git
c59e15e610 upload changes 2017-05-09 20:37:39 +03:00
ayame-git
272ee9efe0 api upload 2017-05-08 12:18:49 +03:00
Andrew Zhao
58b3f2d402 put the trackers on the calculated magnet 2017-05-07 10:47:43 -07:00
Andrew Zhao
ffa5163a41 validate captcha before processing 2017-05-07 10:41:07 -07:00
sfan5
9b6b25e7df Allow storage of uploaded .torrent files (disabled by default) 2017-05-07 15:57:24 +02:00
sfan5
a201d0d058 Remove hardcoded URLs 2017-05-07 15:57:24 +02:00
sfan5
a6dd34a5de Auto-fill filesize 2017-05-07 13:55:35 +02:00
sfan5
767c91bacd Make pre-filling work correctly 2017-05-07 13:54:45 +02:00
sfan5
f9b29af311 Better / fixed validation of uploaded torrent files 2017-05-07 13:53:51 +02:00
bakape
5a55008a16 Merge branch 'master' of https://github.com/ewhal/nyaa into captchas 2017-05-07 12:08:44 +03:00
bakape
8786db1540 Internal IP-specific captchas 2017-05-07 11:25:09 +03:00
Andrew Zhao
f9884c40e9 throw in the description with some sanitizatoin 2017-05-06 22:18:41 -07:00