Fix #416 - Generate random unique 14-byte (19 characters) shortcodes
for local attachments, use them in URLs. Check status privacy before redirecting to actual file.
This commit is contained in:
		
					parent
					
						
							
								9f21eb6064
							
						
					
				
			
			
				commit
				
					
						7b9f8766e8
					
				
			
		
					 4 changed files with 37 additions and 2 deletions
				
			
		|  | @ -10,7 +10,7 @@ | |||
| # | ||||
| # It's strongly recommended that you check this file into your version control system. | ||||
| 
 | ||||
| ActiveRecord::Schema.define(version: 20161222204147) do | ||||
| ActiveRecord::Schema.define(version: 20170105224407) do | ||||
| 
 | ||||
|   # These are extensions that must be enabled in order to support this database | ||||
|   enable_extension "plpgsql" | ||||
|  | @ -95,6 +95,8 @@ ActiveRecord::Schema.define(version: 20161222204147) do | |||
|     t.integer  "account_id" | ||||
|     t.datetime "created_at",                     null: false | ||||
|     t.datetime "updated_at",                     null: false | ||||
|     t.string   "shortcode" | ||||
|     t.index ["shortcode"], name: "index_media_attachments_on_shortcode", unique: true, using: :btree | ||||
|     t.index ["status_id"], name: "index_media_attachments_on_status_id", using: :btree | ||||
|   end | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue