Commit graph

196 commits

Author SHA1 Message Date
cmrd Senya
33ad411bbd
Mentions in comments backend changes 2016-11-28 15:56:56 +02:00
Justin Ramos
fa71af71c1 require spec_helper in .rspec
closes #7223
2016-11-27 21:27:12 +01:00
Justin Ramos
6c6f9bb982
only show community spotlight link on /contacts if it is enabled
closes #7213
2016-11-25 14:10:58 +01:00
Steffen van Bergerem
c3de77e0fc
Send notification mails on CSRF fails
closes #7050
2016-09-04 03:26:42 +02:00
Steffen van Bergerem
6ad9000f8c
Sign out users with wrong CSRF tokens
See http://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf
2016-09-04 03:26:18 +02:00
Jonne Haß
e70ffebc49 Merge pull request #6805 from cmrd-senya/mention-name-fixup
Fix up the meaning of the name parameter in mention
2016-08-11 13:28:02 +02:00
cmrd Senya
d200e92aeb Fix up the meaning of the name parameter in mentions
The desktop frontend now treats the "name" parameter of mention as
a string to display unconditionally. But the Diaspora::Mentionable
renders mentions the different way: "name" is treated as a fallback
string which is rendered only if the person's name is unavailable.
This reflects on the mobile version ATM. This patch makes it behave
the same way as the current desktop version does.
2016-08-11 13:19:48 +03:00
cmrd Senya
4ae26e1ded Upgrade devise to 4.2 2016-08-11 12:25:36 +03:00
Steffen van Bergerem
46cbc6e52a
Filter mentions on status message creation 2016-07-04 10:26:45 +02:00
Benjamin Neff
65f03b2d08 extract mappings between diaspora and the federation gem 2016-06-26 06:21:02 +02:00
Benjamin Neff
1cf11db634 remove diaspora_handle setter to set author 2016-06-26 06:21:02 +02:00
Benjamin Neff
cf5a72719e participates root author when receiving a reshare 2016-06-26 06:21:02 +02:00
Benjamin Neff
b39f3ccc74 relay relayables after receive
also refactored relayable specs to use `let`
2016-06-26 06:21:02 +02:00
Benjamin Neff
902d7faca4 relay retractions for relayables 2016-06-26 06:21:01 +02:00
Benjamin Neff
3df70bb205 send retractions for public targets publicly 2016-06-26 06:21:01 +02:00
Benjamin Neff
5f25135848 send public messages 2016-06-26 06:21:00 +02:00
Benjamin Neff
645c7bd5ad rewrite attack vector specs using new federation 2016-06-26 06:21:00 +02:00
Benjamin Neff
7bb172cefb remove old Private and Public Receiver 2016-06-26 06:21:00 +02:00
Benjamin Neff
581f8d7226 don't force remove contact on block
this creates inconsistent states, if you remove the block in the future
2016-06-26 06:21:00 +02:00
Benjamin Neff
102e2a0834 remove Request class and refactor Connecting 2016-06-26 06:20:59 +02:00
Benjamin Neff
6fbfc2bf96 write receive specs and delete old unused specs
also refactored receive methods
2016-06-26 06:20:59 +02:00
Benjamin Neff
a7f6c84bf3 fix TODOs in federation specs 2016-06-26 06:20:59 +02:00
Benjamin Neff
59bb46eeb6 handle retractions 2016-06-26 06:20:59 +02:00
Benjamin Neff
58a5a881cf receive local
* Contact: auto-follow-back
* Shareable: create share visibilities
2016-06-26 06:20:59 +02:00
Benjamin Neff
f3466bcfd6 update profile 2016-06-26 06:20:59 +02:00
Benjamin Neff
4fb34139b0 cleanup notifications and fix tests 2016-06-26 06:20:59 +02:00
Benjamin Neff
ebfb0aa884 create NotificationService: send notifications after receive 2016-06-26 06:20:59 +02:00
Benjamin Neff
87666eeb35 handle receive contact 2016-06-26 06:20:59 +02:00
Benjamin Neff
e0da6708f4 save entities on receive
first implementation of receive_entity callback
2016-06-26 06:20:59 +02:00
Benjamin Neff
dfe32a5e4b fix federation tests 2016-06-26 06:20:59 +02:00
Benjamin Neff
b1d30aa9cc add more "diaspora to federation entity" methods
move it to Diaspora::Federation::Entities and use it in some tests, but most of the tests can be removed later.
2016-06-26 06:20:58 +02:00
Dennis Schubert
61fb7410cc
Merge pull request #6844 from cmrd-senya/unique-aspect-visibilities
Fix possible duplication of AspectVisibility
2016-06-19 01:49:41 +02:00
Dennis Schubert
520d80cc1a
Merge branch 'stable' into develop 2016-06-09 03:19:35 +02:00
Steffen van Bergerem
a14c61300e
Remove the publisher from the photos page
closes #6851
2016-06-09 03:17:52 +02:00
cmrd Senya
717554edac
Fix possible duplication of AspectVisibility
No uniqueness control on AspectVisibility resulted in possible having
multiple AspectVisibility objects in the DB for the same aspect and
shareable which doesn't make sense. Introduce uniqueness validation
and fix up tests where duplication happened.
2016-05-27 20:22:03 +03:00
Dennis Schubert
e95c742aa1 Merge branch 'stable' into develop 2016-03-30 10:18:09 +02:00
Benjamin Neff
a3ed9da210 changes for new federation-gem version 2016-03-30 09:45:46 +02:00
cmrd Senya
2986aa8b24 Remove diaspora_handle from shareables
We can determine diaspora_handle from a relation with people for the
shareables (posts, photos). So we don't need to store diaspora_handle in
the DB. Also remove tmp_old_id from photos which is not refenrenced anywhere.
2016-03-07 18:47:21 +03:00
Dennis Schubert
91d636b9f6 Merge pull request #6727 from SuperTux88/improve-pod-check
Improve pod check
2016-03-05 06:03:20 +01:00
Benjamin Neff
b1a6516474 add migration for pods-table
* add port to pods
* remove url from person and link people with pod-table
2016-03-05 00:12:54 +01:00
Steffen van Bergerem
bf17205c17 Fix some publisher.scss scss-lint errors 2016-03-04 18:02:22 +01:00
Benjamin Neff
7011f2961d Revert "Back out #6723 due to Postgres breakage"
This reverts commit 84cfbd22fc.
2016-03-04 14:01:31 +01:00
Dennis Schubert
84cfbd22fc Back out #6723 due to Postgres breakage
This reverts commit 832a56134b, reversing
changes made to 75c3e6068c.
2016-03-04 13:33:32 +01:00
Benjamin Neff
7583568be8 update queries for new ShareVisibility
Also:
* remove ShareablesFromPerson evil-query
* improve multi-stream and aspect-stream queries
* fix logging for recieve
* don't add last 100 public posts to users streams after sharing
* delete share visibility when shareable is deleted
2016-03-03 21:43:11 +01:00
Dennis Schubert
515cda7658 Merge branch 'stable' into develop 2016-01-24 07:15:04 +01:00
Benjamin Neff
44ab0df02b fix suppress_annoying_errors
closes #6653
2016-01-24 07:14:58 +01:00
Jonne Haß
baeff22451 Merge pull request #6095 from AugierLe42e/openid
OpenID Connect
2016-01-06 12:30:15 +01:00
Dennis Schubert
40e780abcf Merge branch 'stable' into develop 2016-01-06 00:49:15 +01:00
Benjamin Neff
812510b44a refactoring tests again
closes #6595
2016-01-06 00:47:55 +01:00
cmrd Senya
b6c7f004e4 Further receive tests development 2016-01-06 00:47:42 +01:00
theworldbright
a76f51a6a5 Use redirect_uri if no sector identifier for ppid
As according to http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg:

"If the Client has not provided a value for
sector_identifier_uri in Dynamic Client Registration
[OpenID.Registration], the Sector Identifier used
for pairwise identifier calculation is the host
component of the registered redirect_uri."
2016-01-04 16:49:55 +09:00
theworldbright
6e1a673459 Replace let!() with factory girl 2016-01-04 16:49:52 +09:00
theworldbright
99d6d7b3e7 Add pairwise pseudonymous identifier support
Squashed commits:

[a182de7] Fix pronto/travis errors
2016-01-04 16:49:51 +09:00
theworldbright
d834a1d4d0 Replace user info endpoint with supported claims
The route /api/v0/user/ will now be used as a
non-OIDC route. In other words, the /api/v0/user/
will require the "read" scope while
/api/openid_connect/user_info/ will require the
"openid" scope
2016-01-04 16:49:51 +09:00
theworldbright
bc5e5c7420 Fix pronto errors 2016-01-04 16:49:51 +09:00
theworldbright
beae77102d Allow current user to be obtained from access token 2016-01-04 16:49:16 +09:00
theworldbright
efdfe318fd Add ability to get user info from access tokens 2016-01-04 16:48:42 +09:00
Dennis Schubert
d4fbbd86b3 Merge branch 'stable' into develop 2015-12-30 14:51:05 +01:00
Benjamin Neff
5392c6e6a9 refactoring for federation tests 2015-12-30 14:50:34 +01:00
Jonne Haß
13029235d0 Merge branch 'stable' into develop 2015-12-13 12:28:04 +01:00
cmrd Senya
f0fc62e94d Fix a security issue that author_signature is not checked on the to-downstream receive of a federated relayable entity, allowing to forge relayables if you are an owner of the pod where a parent object is stored.
closes #6539
2015-12-13 12:26:59 +01:00
cmrd Senya
922d26f976 Implement integration tests for the federation messages receive feature
These are some initial tests, more to come.

It tests some features of Request, StatusMessage, Comment, Like,
Participation, Retraction, SignedRetraction, RelayableRetraction entities
receive process.
2015-12-13 12:24:52 +01:00
Dennis Schubert
228f3852b2 Merge branch 'stable' into develop 2015-10-15 05:58:44 +02:00
Steffen van Bergerem
995ce18c37 Display publisher on user profile path
closes #6503
2015-10-15 05:58:38 +02:00
Jonne Haß
d396d5555f Merge branch 'stable' into develop 2015-08-21 14:23:46 +02:00
Benjamin Neff
d28e03f053 use discovery from diaspora_federation gem 2015-08-21 14:21:43 +02:00
augier
9a23c92f8e Show author of NSFW post 2015-07-29 21:13:41 +02:00
Steffen van Bergerem
9ca8005b27 Fix percentage on mobile polls 2015-07-25 04:34:52 +02:00
Steffen van Bergerem
79dfdfa224 Add integration tests for mobile polls and locations 2015-07-23 17:30:53 +02:00
Steffen van Bergerem
3f3087c77f Port tags page to Bootstrap 2014-08-28 18:02:02 +02:00
khall
4edd824d3c No deprecation warnings, but one spec still fails (but only when I run all the specs, not when I run just the one spec) 2014-08-26 17:10:29 -07:00
khall
c42916df27 Two tests failing after rspec 2.99 => 3.0.0 2014-08-26 17:10:26 -07:00
khall
027bb9fcb0 Rspec version bump to 2.99 2014-08-26 17:00:21 -07:00
Jonne Haß
42b08e8ab8 Update to Rails 4.1 2014-08-25 17:37:02 +02:00
Jonne Haß
659f0b96d4 do not pass relations to a method that expects a set of aspects ids or a single aspect 2014-08-23 16:34:01 +02:00
Jonne Haß
09f0665225 replace deprecated usages for all 2014-08-23 16:34:01 +02:00
Jonne Haß
32b9caa08c replace stub and mock deprecations with doubles 2014-01-13 12:25:38 +01:00
Jonne Haß
01ecd9d054 do not overwrite rspec methods (receive) 2014-01-13 12:25:37 +01:00
fabianfiorotto
3e5b29b289 Fix pagination for people list on the tag stream page
Update _index.html.haml

This params broken the pagination of the followers list in tags page
To reproduce try to paginate in
https://joindiaspora.com/tags/diaspora

test for people pagination patch

reducing the per page limit

removing tabs
2013-07-06 13:10:29 +02:00
Florian Staudacher
4ee5d5f19c replace mentions of out-of-aspect people in limited posts with just a
markdown link to their profile (fixes #2516)

add failing spec for #4160 / #2516

extend the spec a bit more

refactor mention handling in a status message

add method for filtering mentions by aspects

wire mention filtering into the status message model, adapt a few tests to
work properly

cosmetic changes

shorten helper methods

add changelog entry
2013-06-09 19:16:40 +02:00
Jonne Haß
79a79d65d6 Bye Resque. Ohai Sidekiq.
* Dropped all references to Resque
* Moved all jobs under app/workers since that's the Sidekiq convention
* Renamed Jobs module to Worker to match new location
* Adapted all jobs to Sidekiq
* Replaced all enqueue calls with perform_async
* Dropped Resque hacks from specs and features, replaced with
  sidekig/testing in RSpec and sidekig/testing/inline in Cucumber
* Updated scripts to start a Sidekiq server
* Inline Sidekiq sinatra app
* Let Sidekiq create the actual Redis instance
* Workaround already initialized constant warnings in service models
* Resolved ToDo in one job definition by creating proper exception clases
  for some errors in receiving posts
* Added sidekiq section to configuration to make it completly
  configurable to the user
* Add Sidekiq middleware for clean backtraces
* Delay HttpMulti retry to give offline pods a chance to come back up
* Do not retry on GUID already taken and alike errors
* Be graceful about deleted posts in GatherOEmbedData
2013-03-21 23:39:07 +01:00
Jonne Haß
7b56c2dd52 Do not fail on receiving a SignedRetraction via the public route 2013-03-01 03:38:36 +01:00
Jonne Haß
c5ecc872ce add integration spec for retracting a comment 2013-02-28 17:20:33 +01:00
Jonne Haß
58d1448085 update factory girl 2012-09-12 13:24:23 +02:00
Jonne Haß
088446e86e bump rspec-rails, remove deprecated rspec syntax 2012-09-11 00:46:36 +02:00
Maxwell Salzberg
190fceaf5c [SECURITY FIX] please update your pod ASAP
This is a fix for public messages, where a malicious pod could spoof a message from someone a user was connected to, as the verified signatures were not checked that the object was also from said sender.  This hole only affected public messages, and the private part of code had the correct checks
THX to s-f-s(Stephan Schulz) for reporting and tracking down this issue, and props to Raven24(florian.staudacher@gmx.at) for helping me test the patch
2012-07-02 10:00:12 -07:00
Zach Prezkuta
9f6d84141c fix incorrect comment on RSpec text 2012-06-09 09:34:06 -06:00
Zach Prezkuta
44e43158cc add rspec test and make fix more rails-y 2012-06-08 22:51:16 -06:00
Maxwell Salzberg
471ce309ea kill your darlings; remove diaspora_client with fire 2012-05-17 14:55:53 -07:00
Maxwell Salzberg
b124d3e5a1 Revert "update factory girl" new version does not support 1.8.7 :(
This reverts commit c52342b7cb.
2012-05-16 17:43:56 -07:00
Maxwell Salzberg
c52342b7cb update factory girl 2012-05-16 17:17:14 -07:00
Maxwell Salzberg
9e249bb7ef small refactor of helper method [ci skip] 2012-03-03 17:53:50 -08:00
Maxwell Salzberg
e6b1111fd1 AHHHH refactor attack_vectors_spec; hopefully it now borders on understandiablity. this deffy needs another pass from another human, as I had to make tons of spec helper methods to make the crazy setup make sense, but I think we are bordering on something that would let us write new tests in a sane way. whether all of these tests now make sense to test in the first place, that is another question all togther, as it was outside the scope of this refactor 2012-03-03 17:50:51 -08:00
danielgrippi
a3e13e3c0e User#like! method. 2012-02-03 14:42:03 -08:00
danielgrippi
02021584a7 EvilQuery for Participation, refactor comment creation
you can now create a comment with User#comment!(post, text)
2012-02-01 15:09:31 -08:00
danielgrippi
eaed3505e4 Don't create share_visibilities for public posts, sans migration of deleting old data. 2012-01-24 16:49:07 -08:00
Maxwell Salzberg
49f18d435a upgrade factory girl there are 3 failing cukes. 2012-01-21 21:58:50 -08:00
danielgrippi
0e5bb81d66 remove all references to the websocket. bang bang. 2012-01-10 12:28:19 -08:00
Maxwell Salzberg
63cdd93afc the websocket has been completely removed, and replaced for a stub until
we find a better way to reimpliment it in a  more sane way
2012-01-03 18:39:54 -08:00
Ilya Zhitomirskiy
03ca34767a ms iz rendering nothing for hcard and webfinger if account is closed, not showing aspect dropdown if the user account is closed 2011-12-08 16:32:18 -08:00